@amabeth/repeating-wheel-picker 1.2.0 → 1.2.1

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 (244) hide show
  1. package/package.json +3 -2
  2. package/example/node_modules/@expo/cli/static/template/+html.tsx +0 -28
  3. package/example/node_modules/@expo/cli/static/template/+native-intent.ts +0 -9
  4. package/example/node_modules/@expo/cli/static/template/[...rsc]+api.ts +0 -16
  5. package/example/node_modules/ansi-styles/index.d.ts +0 -345
  6. package/example/node_modules/chalk/index.d.ts +0 -415
  7. package/example/node_modules/commander/typings/index.d.ts +0 -627
  8. package/example/node_modules/expo/Expo.podspec +0 -108
  9. package/example/node_modules/expo/build/Expo.d.ts +0 -8
  10. package/example/node_modules/expo/build/Expo.fx.d.ts +0 -4
  11. package/example/node_modules/expo/build/Expo.fx.web.d.ts +0 -3
  12. package/example/node_modules/expo/build/devtools/DevToolsPluginClient.d.ts +0 -72
  13. package/example/node_modules/expo/build/devtools/DevToolsPluginClientFactory.d.ts +0 -16
  14. package/example/node_modules/expo/build/devtools/DevToolsPluginClientImplApp.d.ts +0 -15
  15. package/example/node_modules/expo/build/devtools/DevToolsPluginClientImplBrowser.d.ts +0 -14
  16. package/example/node_modules/expo/build/devtools/MessageFramePacker.d.ts +0 -50
  17. package/example/node_modules/expo/build/devtools/ProtocolVersion.d.ts +0 -7
  18. package/example/node_modules/expo/build/devtools/WebSocketBackingStore.d.ts +0 -10
  19. package/example/node_modules/expo/build/devtools/WebSocketWithReconnect.d.ts +0 -81
  20. package/example/node_modules/expo/build/devtools/devtools.types.d.ts +0 -42
  21. package/example/node_modules/expo/build/devtools/getConnectionInfo.d.ts +0 -6
  22. package/example/node_modules/expo/build/devtools/getConnectionInfo.native.d.ts +0 -6
  23. package/example/node_modules/expo/build/devtools/index.d.ts +0 -12
  24. package/example/node_modules/expo/build/devtools/logger.d.ts +0 -6
  25. package/example/node_modules/expo/build/dom/base.d.ts +0 -5
  26. package/example/node_modules/expo/build/dom/dom-entry.d.ts +0 -3
  27. package/example/node_modules/expo/build/dom/dom-hooks.d.ts +0 -8
  28. package/example/node_modules/expo/build/dom/dom.d.ts +0 -5
  29. package/example/node_modules/expo/build/dom/dom.types.d.ts +0 -34
  30. package/example/node_modules/expo/build/dom/dom.web.d.ts +0 -3
  31. package/example/node_modules/expo/build/dom/global-events.d.ts +0 -4
  32. package/example/node_modules/expo/build/dom/injection.d.ts +0 -9
  33. package/example/node_modules/expo/build/dom/internal.d.ts +0 -3
  34. package/example/node_modules/expo/build/dom/internal.web.d.ts +0 -2
  35. package/example/node_modules/expo/build/dom/marshal.d.ts +0 -4
  36. package/example/node_modules/expo/build/dom/webview/ExpoDOMWebView.d.ts +0 -6
  37. package/example/node_modules/expo/build/dom/webview/RNWebView.d.ts +0 -7
  38. package/example/node_modules/expo/build/dom/webview/useDebugZeroHeight.d.ts +0 -12
  39. package/example/node_modules/expo/build/dom/webview-wrapper.d.ts +0 -16
  40. package/example/node_modules/expo/build/environment/DevLoadingView.d.ts +0 -3
  41. package/example/node_modules/expo/build/environment/DevLoadingView.web.d.ts +0 -3
  42. package/example/node_modules/expo/build/environment/DevLoadingViewNativeModule.d.ts +0 -9
  43. package/example/node_modules/expo/build/environment/DevLoadingViewNativeModule.native.d.ts +0 -3
  44. package/example/node_modules/expo/build/environment/ExpoGo.d.ts +0 -31
  45. package/example/node_modules/expo/build/environment/ExpoGo.web.d.ts +0 -3
  46. package/example/node_modules/expo/build/environment/getInitialSafeArea.d.ts +0 -7
  47. package/example/node_modules/expo/build/environment/getInitialSafeArea.native.d.ts +0 -11
  48. package/example/node_modules/expo/build/errors/AppEntryNotFound.d.ts +0 -2
  49. package/example/node_modules/expo/build/errors/ExpoErrorManager.d.ts +0 -8
  50. package/example/node_modules/expo/build/errors/ExpoErrorManager.native.d.ts +0 -4
  51. package/example/node_modules/expo/build/hooks/useEvent.d.ts +0 -59
  52. package/example/node_modules/expo/build/launch/registerRootComponent.d.ts +0 -30
  53. package/example/node_modules/expo/build/launch/withDevTools.d.ts +0 -3
  54. package/example/node_modules/expo/build/launch/withDevTools.ios.d.ts +0 -7
  55. package/example/node_modules/expo/build/launch/withDevTools.web.d.ts +0 -3
  56. package/example/node_modules/expo/build/timer/polyfillNextTick.d.ts +0 -6
  57. package/example/node_modules/expo/build/utils/blobUtils.d.ts +0 -9
  58. package/example/node_modules/expo/build/utils/getBundleUrl.d.ts +0 -2
  59. package/example/node_modules/expo/build/utils/getBundleUrl.native.d.ts +0 -2
  60. package/example/node_modules/expo/build/utils/getBundleUrl.web.d.ts +0 -2
  61. package/example/node_modules/expo/build/winter/FormData.d.ts +0 -49
  62. package/example/node_modules/expo/build/winter/ImportMetaRegistry.d.ts +0 -9
  63. package/example/node_modules/expo/build/winter/TextDecoder.d.ts +0 -20
  64. package/example/node_modules/expo/build/winter/fetch/ExpoFetchModule.d.ts +0 -2
  65. package/example/node_modules/expo/build/winter/fetch/ExpoFetchModule.web.d.ts +0 -10
  66. package/example/node_modules/expo/build/winter/fetch/FetchErrors.d.ts +0 -8
  67. package/example/node_modules/expo/build/winter/fetch/FetchResponse.d.ts +0 -31
  68. package/example/node_modules/expo/build/winter/fetch/NativeRequest.d.ts +0 -30
  69. package/example/node_modules/expo/build/winter/fetch/RequestUtils.d.ts +0 -21
  70. package/example/node_modules/expo/build/winter/fetch/convertFormData.d.ts +0 -19
  71. package/example/node_modules/expo/build/winter/fetch/fetch.d.ts +0 -4
  72. package/example/node_modules/expo/build/winter/fetch/fetch.types.d.ts +0 -16
  73. package/example/node_modules/expo/build/winter/fetch/fetch.web.d.ts +0 -2
  74. package/example/node_modules/expo/build/winter/fetch/index.d.ts +0 -3
  75. package/example/node_modules/expo/build/winter/index.d.ts +0 -2
  76. package/example/node_modules/expo/build/winter/runtime.d.ts +0 -2
  77. package/example/node_modules/expo/build/winter/runtime.native.d.ts +0 -2
  78. package/example/node_modules/expo/build/winter/url.d.ts +0 -23
  79. package/example/node_modules/expo/config-plugins.d.ts +0 -1
  80. package/example/node_modules/expo/config.d.ts +0 -1
  81. package/example/node_modules/expo/devtools.d.ts +0 -1
  82. package/example/node_modules/expo/dom/global.d.ts +0 -1
  83. package/example/node_modules/expo/dom/index.d.ts +0 -1
  84. package/example/node_modules/expo/dom/internal.d.ts +0 -1
  85. package/example/node_modules/expo/fetch.d.ts +0 -1
  86. package/example/node_modules/expo/fingerprint.d.ts +0 -1
  87. package/example/node_modules/expo/metro-config.d.ts +0 -1
  88. package/example/node_modules/expo/react-native.config.js +0 -50
  89. package/example/node_modules/expo/src/Expo.fx.tsx +0 -53
  90. package/example/node_modules/expo/src/Expo.fx.web.tsx +0 -21
  91. package/example/node_modules/expo/src/Expo.ts +0 -30
  92. package/example/node_modules/expo/src/devtools/DevToolsPluginClient.ts +0 -240
  93. package/example/node_modules/expo/src/devtools/DevToolsPluginClientFactory.ts +0 -73
  94. package/example/node_modules/expo/src/devtools/DevToolsPluginClientImplApp.ts +0 -56
  95. package/example/node_modules/expo/src/devtools/DevToolsPluginClientImplBrowser.ts +0 -38
  96. package/example/node_modules/expo/src/devtools/MessageFramePacker.ts +0 -235
  97. package/example/node_modules/expo/src/devtools/ProtocolVersion.ts +0 -6
  98. package/example/node_modules/expo/src/devtools/WebSocketBackingStore.ts +0 -10
  99. package/example/node_modules/expo/src/devtools/WebSocketWithReconnect.ts +0 -318
  100. package/example/node_modules/expo/src/devtools/devtools.types.ts +0 -50
  101. package/example/node_modules/expo/src/devtools/getConnectionInfo.native.ts +0 -18
  102. package/example/node_modules/expo/src/devtools/getConnectionInfo.ts +0 -16
  103. package/example/node_modules/expo/src/devtools/index.ts +0 -53
  104. package/example/node_modules/expo/src/devtools/logger.ts +0 -29
  105. package/example/node_modules/expo/src/dom/base.ts +0 -62
  106. package/example/node_modules/expo/src/dom/dom-entry.tsx +0 -128
  107. package/example/node_modules/expo/src/dom/dom-hooks.ts +0 -46
  108. package/example/node_modules/expo/src/dom/dom.ts +0 -8
  109. package/example/node_modules/expo/src/dom/dom.types.ts +0 -39
  110. package/example/node_modules/expo/src/dom/dom.web.ts +0 -6
  111. package/example/node_modules/expo/src/dom/global-events.ts +0 -16
  112. package/example/node_modules/expo/src/dom/injection.ts +0 -42
  113. package/example/node_modules/expo/src/dom/internal.ts +0 -5
  114. package/example/node_modules/expo/src/dom/internal.web.ts +0 -1
  115. package/example/node_modules/expo/src/dom/marshal.tsx +0 -116
  116. package/example/node_modules/expo/src/dom/webview/ExpoDOMWebView.ts +0 -10
  117. package/example/node_modules/expo/src/dom/webview/RNWebView.ts +0 -12
  118. package/example/node_modules/expo/src/dom/webview/useDebugZeroHeight.ts +0 -62
  119. package/example/node_modules/expo/src/dom/webview-wrapper.tsx +0 -253
  120. package/example/node_modules/expo/src/environment/DevLoadingView.tsx +0 -123
  121. package/example/node_modules/expo/src/environment/DevLoadingView.web.tsx +0 -135
  122. package/example/node_modules/expo/src/environment/DevLoadingViewNativeModule.native.ts +0 -3
  123. package/example/node_modules/expo/src/environment/DevLoadingViewNativeModule.ts +0 -7
  124. package/example/node_modules/expo/src/environment/ExpoGo.ts +0 -53
  125. package/example/node_modules/expo/src/environment/ExpoGo.web.ts +0 -7
  126. package/example/node_modules/expo/src/environment/getInitialSafeArea.native.ts +0 -16
  127. package/example/node_modules/expo/src/environment/getInitialSafeArea.ts +0 -8
  128. package/example/node_modules/expo/src/errors/AppEntryNotFound.tsx +0 -35
  129. package/example/node_modules/expo/src/errors/ExpoErrorManager.native.ts +0 -51
  130. package/example/node_modules/expo/src/errors/ExpoErrorManager.ts +0 -11
  131. package/example/node_modules/expo/src/hooks/useEvent.ts +0 -112
  132. package/example/node_modules/expo/src/launch/registerRootComponent.tsx +0 -64
  133. package/example/node_modules/expo/src/launch/withDevTools.ios.tsx +0 -47
  134. package/example/node_modules/expo/src/launch/withDevTools.tsx +0 -30
  135. package/example/node_modules/expo/src/launch/withDevTools.web.tsx +0 -23
  136. package/example/node_modules/expo/src/timer/polyfillNextTick.ts +0 -10
  137. package/example/node_modules/expo/src/ts-declarations/console.d.ts +0 -47
  138. package/example/node_modules/expo/src/ts-declarations/global.d.ts +0 -12
  139. package/example/node_modules/expo/src/ts-declarations/react-native.d.ts +0 -34
  140. package/example/node_modules/expo/src/ts-declarations/whatwg-url-without-unicode.d.ts +0 -186
  141. package/example/node_modules/expo/src/utils/blobUtils.ts +0 -23
  142. package/example/node_modules/expo/src/utils/getBundleUrl.native.ts +0 -17
  143. package/example/node_modules/expo/src/utils/getBundleUrl.ts +0 -5
  144. package/example/node_modules/expo/src/utils/getBundleUrl.web.ts +0 -21
  145. package/example/node_modules/expo/src/winter/FormData.ts +0 -222
  146. package/example/node_modules/expo/src/winter/ImportMetaRegistry.ts +0 -14
  147. package/example/node_modules/expo/src/winter/TextDecoder.ts +0 -429
  148. package/example/node_modules/expo/src/winter/fetch/ExpoFetchModule.ts +0 -3
  149. package/example/node_modules/expo/src/winter/fetch/ExpoFetchModule.web.ts +0 -7
  150. package/example/node_modules/expo/src/winter/fetch/FetchErrors.ts +0 -11
  151. package/example/node_modules/expo/src/winter/fetch/FetchResponse.ts +0 -146
  152. package/example/node_modules/expo/src/winter/fetch/NativeRequest.ts +0 -38
  153. package/example/node_modules/expo/src/winter/fetch/RequestUtils.ts +0 -124
  154. package/example/node_modules/expo/src/winter/fetch/convertFormData.ts +0 -92
  155. package/example/node_modules/expo/src/winter/fetch/fetch.ts +0 -59
  156. package/example/node_modules/expo/src/winter/fetch/fetch.types.ts +0 -17
  157. package/example/node_modules/expo/src/winter/fetch/fetch.web.ts +0 -1
  158. package/example/node_modules/expo/src/winter/fetch/index.ts +0 -2
  159. package/example/node_modules/expo/src/winter/index.ts +0 -1
  160. package/example/node_modules/expo/src/winter/runtime.native.ts +0 -41
  161. package/example/node_modules/expo/src/winter/runtime.ts +0 -5
  162. package/example/node_modules/expo/src/winter/url.ts +0 -116
  163. package/example/node_modules/expo/types/global.d.ts +0 -38
  164. package/example/node_modules/expo/types/index.d.ts +0 -3
  165. package/example/node_modules/expo/types/metro-require.d.ts +0 -52
  166. package/example/node_modules/expo/types/react-native-web.d.ts +0 -291
  167. package/example/node_modules/expo-modules-autolinking/build/ExpoModuleConfig.d.ts +0 -85
  168. package/example/node_modules/expo-modules-autolinking/build/autolinking/findModules.d.ts +0 -5
  169. package/example/node_modules/expo-modules-autolinking/build/autolinking/generatePackageList.d.ts +0 -11
  170. package/example/node_modules/expo-modules-autolinking/build/autolinking/getConfiguration.d.ts +0 -2
  171. package/example/node_modules/expo-modules-autolinking/build/autolinking/index.d.ts +0 -17
  172. package/example/node_modules/expo-modules-autolinking/build/autolinking/mergeLinkingOptions.d.ts +0 -21
  173. package/example/node_modules/expo-modules-autolinking/build/autolinking/resolveModules.d.ts +0 -9
  174. package/example/node_modules/expo-modules-autolinking/build/autolinking/utils.d.ts +0 -6
  175. package/example/node_modules/expo-modules-autolinking/build/autolinking/verifySearchResults.d.ts +0 -5
  176. package/example/node_modules/expo-modules-autolinking/build/fileUtils.d.ts +0 -18
  177. package/example/node_modules/expo-modules-autolinking/build/index.d.ts +0 -1
  178. package/example/node_modules/expo-modules-autolinking/build/platforms/android.d.ts +0 -38
  179. package/example/node_modules/expo-modules-autolinking/build/platforms/apple.d.ts +0 -15
  180. package/example/node_modules/expo-modules-autolinking/build/platforms/devtools.d.ts +0 -3
  181. package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/androidResolver.d.ts +0 -20
  182. package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/config.d.ts +0 -5
  183. package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/index.d.ts +0 -2
  184. package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/iosResolver.d.ts +0 -2
  185. package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/reactNativeConfig.d.ts +0 -13
  186. package/example/node_modules/expo-modules-autolinking/build/reactNativeConfig/reactNativeConfig.types.d.ts +0 -95
  187. package/example/node_modules/expo-modules-autolinking/build/types.d.ts +0 -319
  188. package/example/node_modules/expo-modules-autolinking/e2e/TestUtils.ts +0 -53
  189. package/example/node_modules/expo-modules-autolinking/exports.d.ts +0 -1
  190. package/example/node_modules/expo-modules-autolinking/src/ExpoModuleConfig.ts +0 -181
  191. package/example/node_modules/expo-modules-autolinking/src/autolinking/findModules.ts +0 -259
  192. package/example/node_modules/expo-modules-autolinking/src/autolinking/generatePackageList.ts +0 -46
  193. package/example/node_modules/expo-modules-autolinking/src/autolinking/getConfiguration.ts +0 -7
  194. package/example/node_modules/expo-modules-autolinking/src/autolinking/index.ts +0 -45
  195. package/example/node_modules/expo-modules-autolinking/src/autolinking/mergeLinkingOptions.ts +0 -127
  196. package/example/node_modules/expo-modules-autolinking/src/autolinking/resolveModules.ts +0 -46
  197. package/example/node_modules/expo-modules-autolinking/src/autolinking/utils.ts +0 -37
  198. package/example/node_modules/expo-modules-autolinking/src/autolinking/verifySearchResults.ts +0 -33
  199. package/example/node_modules/expo-modules-autolinking/src/fileUtils.ts +0 -64
  200. package/example/node_modules/expo-modules-autolinking/src/index.ts +0 -262
  201. package/example/node_modules/expo-modules-autolinking/src/platforms/android.ts +0 -303
  202. package/example/node_modules/expo-modules-autolinking/src/platforms/apple.ts +0 -292
  203. package/example/node_modules/expo-modules-autolinking/src/platforms/devtools.ts +0 -25
  204. package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/androidResolver.ts +0 -264
  205. package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/config.ts +0 -67
  206. package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/index.ts +0 -2
  207. package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/iosResolver.ts +0 -37
  208. package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/reactNativeConfig.ts +0 -245
  209. package/example/node_modules/expo-modules-autolinking/src/reactNativeConfig/reactNativeConfig.types.ts +0 -107
  210. package/example/node_modules/expo-modules-autolinking/src/types.ts +0 -384
  211. package/example/node_modules/find-up/index.d.ts +0 -138
  212. package/example/node_modules/glob/dist/commonjs/glob.d.ts +0 -388
  213. package/example/node_modules/glob/dist/commonjs/has-magic.d.ts +0 -14
  214. package/example/node_modules/glob/dist/commonjs/ignore.d.ts +0 -24
  215. package/example/node_modules/glob/dist/commonjs/index.d.ts +0 -97
  216. package/example/node_modules/glob/dist/commonjs/pattern.d.ts +0 -76
  217. package/example/node_modules/glob/dist/commonjs/processor.d.ts +0 -59
  218. package/example/node_modules/glob/dist/commonjs/walker.d.ts +0 -97
  219. package/example/node_modules/glob/dist/esm/glob.d.ts +0 -388
  220. package/example/node_modules/glob/dist/esm/has-magic.d.ts +0 -14
  221. package/example/node_modules/glob/dist/esm/ignore.d.ts +0 -24
  222. package/example/node_modules/glob/dist/esm/index.d.ts +0 -97
  223. package/example/node_modules/glob/dist/esm/pattern.d.ts +0 -76
  224. package/example/node_modules/glob/dist/esm/processor.d.ts +0 -59
  225. package/example/node_modules/glob/dist/esm/walker.d.ts +0 -97
  226. package/example/node_modules/locate-path/index.d.ts +0 -83
  227. package/example/node_modules/log-symbols/node_modules/chalk/types/index.d.ts +0 -97
  228. package/example/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +0 -2
  229. package/example/node_modules/minimatch/dist/commonjs/ast.d.ts +0 -20
  230. package/example/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +0 -8
  231. package/example/node_modules/minimatch/dist/commonjs/escape.d.ts +0 -12
  232. package/example/node_modules/minimatch/dist/commonjs/index.d.ts +0 -94
  233. package/example/node_modules/minimatch/dist/commonjs/unescape.d.ts +0 -17
  234. package/example/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +0 -2
  235. package/example/node_modules/minimatch/dist/esm/ast.d.ts +0 -20
  236. package/example/node_modules/minimatch/dist/esm/brace-expressions.d.ts +0 -8
  237. package/example/node_modules/minimatch/dist/esm/escape.d.ts +0 -12
  238. package/example/node_modules/minimatch/dist/esm/index.d.ts +0 -94
  239. package/example/node_modules/minimatch/dist/esm/unescape.d.ts +0 -17
  240. package/example/node_modules/ora/index.d.ts +0 -257
  241. package/example/node_modules/ora/node_modules/chalk/types/index.d.ts +0 -97
  242. package/example/node_modules/ora/node_modules/strip-ansi/index.d.ts +0 -15
  243. package/example/node_modules/p-locate/index.d.ts +0 -53
  244. package/example/node_modules/path-exists/index.d.ts +0 -28
@@ -1,627 +0,0 @@
1
- // Type definitions for commander
2
- // Original definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne>
3
-
4
- // Using method rather than property for method-signature-style, to document method overloads separately. Allow either.
5
- /* eslint-disable @typescript-eslint/method-signature-style */
6
- /* eslint-disable @typescript-eslint/no-explicit-any */
7
-
8
- declare namespace commander {
9
-
10
- interface CommanderError extends Error {
11
- code: string;
12
- exitCode: number;
13
- message: string;
14
- nestedError?: string;
15
- }
16
- type CommanderErrorConstructor = new (exitCode: number, code: string, message: string) => CommanderError;
17
-
18
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
19
- interface InvalidOptionArgumentError extends CommanderError {
20
- }
21
- type InvalidOptionArgumentErrorConstructor = new (message: string) => InvalidOptionArgumentError;
22
-
23
- interface Option {
24
- flags: string;
25
- description: string;
26
-
27
- required: boolean; // A value must be supplied when the option is specified.
28
- optional: boolean; // A value is optional when the option is specified.
29
- variadic: boolean;
30
- mandatory: boolean; // The option must have a value after parsing, which usually means it must be specified on command line.
31
- optionFlags: string;
32
- short?: string;
33
- long?: string;
34
- negate: boolean;
35
- defaultValue?: any;
36
- defaultValueDescription?: string;
37
- parseArg?: <T>(value: string, previous: T) => T;
38
- hidden: boolean;
39
- argChoices?: string[];
40
-
41
- /**
42
- * Set the default value, and optionally supply the description to be displayed in the help.
43
- */
44
- default(value: any, description?: string): this;
45
-
46
- /**
47
- * Calculate the full description, including defaultValue etc.
48
- */
49
- fullDescription(): string;
50
-
51
- /**
52
- * Set the custom handler for processing CLI option arguments into option values.
53
- */
54
- argParser<T>(fn: (value: string, previous: T) => T): this;
55
-
56
- /**
57
- * Whether the option is mandatory and must have a value after parsing.
58
- */
59
- makeOptionMandatory(mandatory?: boolean): this;
60
-
61
- /**
62
- * Hide option in help.
63
- */
64
- hideHelp(hide?: boolean): this;
65
-
66
- /**
67
- * Validation of option argument failed.
68
- * Intended for use from custom argument processing functions.
69
- */
70
- argumentRejected(messsage: string): never;
71
-
72
- /**
73
- * Only allow option value to be one of choices.
74
- */
75
- choices(values: string[]): this;
76
-
77
- /**
78
- * Return option name.
79
- */
80
- name(): string;
81
-
82
- /**
83
- * Return option name, in a camelcase format that can be used
84
- * as a object attribute key.
85
- */
86
- attributeName(): string;
87
- }
88
- type OptionConstructor = new (flags: string, description?: string) => Option;
89
-
90
- interface Help {
91
- /** output helpWidth, long lines are wrapped to fit */
92
- helpWidth?: number;
93
- sortSubcommands: boolean;
94
- sortOptions: boolean;
95
-
96
- /** Get the command term to show in the list of subcommands. */
97
- subcommandTerm(cmd: Command): string;
98
- /** Get the command description to show in the list of subcommands. */
99
- subcommandDescription(cmd: Command): string;
100
- /** Get the option term to show in the list of options. */
101
- optionTerm(option: Option): string;
102
- /** Get the option description to show in the list of options. */
103
- optionDescription(option: Option): string;
104
-
105
- /** Get the command usage to be displayed at the top of the built-in help. */
106
- commandUsage(cmd: Command): string;
107
- /** Get the description for the command. */
108
- commandDescription(cmd: Command): string;
109
-
110
- /** Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one. */
111
- visibleCommands(cmd: Command): Command[];
112
- /** Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one. */
113
- visibleOptions(cmd: Command): Option[];
114
- /** Get an array of the arguments which have descriptions. */
115
- visibleArguments(cmd: Command): Array<{ term: string; description: string}>;
116
-
117
- /** Get the longest command term length. */
118
- longestSubcommandTermLength(cmd: Command, helper: Help): number;
119
- /** Get the longest option term length. */
120
- longestOptionTermLength(cmd: Command, helper: Help): number;
121
- /** Get the longest argument term length. */
122
- longestArgumentTermLength(cmd: Command, helper: Help): number;
123
- /** Calculate the pad width from the maximum term length. */
124
- padWidth(cmd: Command, helper: Help): number;
125
-
126
- /**
127
- * Wrap the given string to width characters per line, with lines after the first indented.
128
- * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.
129
- */
130
- wrap(str: string, width: number, indent: number, minColumnWidth?: number): string;
131
-
132
- /** Generate the built-in help text. */
133
- formatHelp(cmd: Command, helper: Help): string;
134
- }
135
- type HelpConstructor = new () => Help;
136
- type HelpConfiguration = Partial<Help>;
137
-
138
- interface ParseOptions {
139
- from: 'node' | 'electron' | 'user';
140
- }
141
- interface HelpContext { // optional parameter for .help() and .outputHelp()
142
- error: boolean;
143
- }
144
- interface AddHelpTextContext { // passed to text function used with .addHelpText()
145
- error: boolean;
146
- command: Command;
147
- }
148
- interface OutputConfiguration {
149
- writeOut?(str: string): void;
150
- writeErr?(str: string): void;
151
- getOutHelpWidth?(): number;
152
- getErrHelpWidth?(): number;
153
- outputError?(str: string, write: (str: string) => void): void;
154
-
155
- }
156
-
157
- type AddHelpTextPosition = 'beforeAll' | 'before' | 'after' | 'afterAll';
158
-
159
- interface OptionValues {
160
- [key: string]: any;
161
- }
162
-
163
- interface Command {
164
- args: string[];
165
- commands: Command[];
166
- parent: Command | null;
167
-
168
- /**
169
- * Set the program version to `str`.
170
- *
171
- * This method auto-registers the "-V, --version" flag
172
- * which will print the version number when passed.
173
- *
174
- * You can optionally supply the flags and description to override the defaults.
175
- */
176
- version(str: string, flags?: string, description?: string): this;
177
-
178
- /**
179
- * Define a command, implemented using an action handler.
180
- *
181
- * @remarks
182
- * The command description is supplied using `.description`, not as a parameter to `.command`.
183
- *
184
- * @example
185
- * ```ts
186
- * program
187
- * .command('clone <source> [destination]')
188
- * .description('clone a repository into a newly created directory')
189
- * .action((source, destination) => {
190
- * console.log('clone command called');
191
- * });
192
- * ```
193
- *
194
- * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
195
- * @param opts - configuration options
196
- * @returns new command
197
- */
198
- command(nameAndArgs: string, opts?: CommandOptions): ReturnType<this['createCommand']>;
199
- /**
200
- * Define a command, implemented in a separate executable file.
201
- *
202
- * @remarks
203
- * The command description is supplied as the second parameter to `.command`.
204
- *
205
- * @example
206
- * ```ts
207
- * program
208
- * .command('start <service>', 'start named service')
209
- * .command('stop [service]', 'stop named service, or all if no name supplied');
210
- * ```
211
- *
212
- * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
213
- * @param description - description of executable command
214
- * @param opts - configuration options
215
- * @returns `this` command for chaining
216
- */
217
- command(nameAndArgs: string, description: string, opts?: commander.ExecutableCommandOptions): this;
218
-
219
- /**
220
- * Factory routine to create a new unattached command.
221
- *
222
- * See .command() for creating an attached subcommand, which uses this routine to
223
- * create the command. You can override createCommand to customise subcommands.
224
- */
225
- createCommand(name?: string): Command;
226
-
227
- /**
228
- * Add a prepared subcommand.
229
- *
230
- * See .command() for creating an attached subcommand which inherits settings from its parent.
231
- *
232
- * @returns `this` command for chaining
233
- */
234
- addCommand(cmd: Command, opts?: CommandOptions): this;
235
-
236
- /**
237
- * Define argument syntax for command.
238
- *
239
- * @returns `this` command for chaining
240
- */
241
- arguments(desc: string): this;
242
-
243
- /**
244
- * Override default decision whether to add implicit help command.
245
- *
246
- * addHelpCommand() // force on
247
- * addHelpCommand(false); // force off
248
- * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details
249
- *
250
- * @returns `this` command for chaining
251
- */
252
- addHelpCommand(enableOrNameAndArgs?: string | boolean, description?: string): this;
253
-
254
- /**
255
- * Register callback to use as replacement for calling process.exit.
256
- */
257
- exitOverride(callback?: (err: CommanderError) => never|void): this;
258
-
259
- /**
260
- * You can customise the help with a subclass of Help by overriding createHelp,
261
- * or by overriding Help properties using configureHelp().
262
- */
263
- createHelp(): Help;
264
-
265
- /**
266
- * You can customise the help by overriding Help properties using configureHelp(),
267
- * or with a subclass of Help by overriding createHelp().
268
- */
269
- configureHelp(configuration: HelpConfiguration): this;
270
- /** Get configuration */
271
- configureHelp(): HelpConfiguration;
272
-
273
- /**
274
- * The default output goes to stdout and stderr. You can customise this for special
275
- * applications. You can also customise the display of errors by overriding outputError.
276
- *
277
- * The configuration properties are all functions:
278
- *
279
- * // functions to change where being written, stdout and stderr
280
- * writeOut(str)
281
- * writeErr(str)
282
- * // matching functions to specify width for wrapping help
283
- * getOutHelpWidth()
284
- * getErrHelpWidth()
285
- * // functions based on what is being written out
286
- * outputError(str, write) // used for displaying errors, and not used for displaying help
287
- */
288
- configureOutput(configuration: OutputConfiguration): this;
289
- /** Get configuration */
290
- configureOutput(): OutputConfiguration;
291
-
292
- /**
293
- * Register callback `fn` for the command.
294
- *
295
- * @example
296
- * program
297
- * .command('help')
298
- * .description('display verbose help')
299
- * .action(function() {
300
- * // output help here
301
- * });
302
- *
303
- * @returns `this` command for chaining
304
- */
305
- action(fn: (...args: any[]) => void | Promise<void>): this;
306
-
307
- /**
308
- * Define option with `flags`, `description` and optional
309
- * coercion `fn`.
310
- *
311
- * The `flags` string contains the short and/or long flags,
312
- * separated by comma, a pipe or space. The following are all valid
313
- * all will output this way when `--help` is used.
314
- *
315
- * "-p, --pepper"
316
- * "-p|--pepper"
317
- * "-p --pepper"
318
- *
319
- * @example
320
- * // simple boolean defaulting to false
321
- * program.option('-p, --pepper', 'add pepper');
322
- *
323
- * --pepper
324
- * program.pepper
325
- * // => Boolean
326
- *
327
- * // simple boolean defaulting to true
328
- * program.option('-C, --no-cheese', 'remove cheese');
329
- *
330
- * program.cheese
331
- * // => true
332
- *
333
- * --no-cheese
334
- * program.cheese
335
- * // => false
336
- *
337
- * // required argument
338
- * program.option('-C, --chdir <path>', 'change the working directory');
339
- *
340
- * --chdir /tmp
341
- * program.chdir
342
- * // => "/tmp"
343
- *
344
- * // optional argument
345
- * program.option('-c, --cheese [type]', 'add cheese [marble]');
346
- *
347
- * @returns `this` command for chaining
348
- */
349
- option(flags: string, description?: string, defaultValue?: string | boolean): this;
350
- option<T>(flags: string, description: string, fn: (value: string, previous: T) => T, defaultValue?: T): this;
351
- /** @deprecated since v7, instead use choices or a custom function */
352
- option(flags: string, description: string, regexp: RegExp, defaultValue?: string | boolean): this;
353
-
354
- /**
355
- * Define a required option, which must have a value after parsing. This usually means
356
- * the option must be specified on the command line. (Otherwise the same as .option().)
357
- *
358
- * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.
359
- */
360
- requiredOption(flags: string, description?: string, defaultValue?: string | boolean): this;
361
- requiredOption<T>(flags: string, description: string, fn: (value: string, previous: T) => T, defaultValue?: T): this;
362
- /** @deprecated since v7, instead use choices or a custom function */
363
- requiredOption(flags: string, description: string, regexp: RegExp, defaultValue?: string | boolean): this;
364
-
365
- /**
366
- * Factory routine to create a new unattached option.
367
- *
368
- * See .option() for creating an attached option, which uses this routine to
369
- * create the option. You can override createOption to return a custom option.
370
- */
371
-
372
- createOption(flags: string, description?: string): Option;
373
-
374
- /**
375
- * Add a prepared Option.
376
- *
377
- * See .option() and .requiredOption() for creating and attaching an option in a single call.
378
- */
379
- addOption(option: Option): this;
380
-
381
- /**
382
- * Whether to store option values as properties on command object,
383
- * or store separately (specify false). In both cases the option values can be accessed using .opts().
384
- *
385
- * @returns `this` command for chaining
386
- */
387
- storeOptionsAsProperties(): this & OptionValues;
388
- storeOptionsAsProperties(storeAsProperties: true): this & OptionValues;
389
- storeOptionsAsProperties(storeAsProperties?: boolean): this;
390
-
391
- /**
392
- * Alter parsing of short flags with optional values.
393
- *
394
- * @example
395
- * // for `.option('-f,--flag [value]'):
396
- * .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour
397
- * .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`
398
- *
399
- * @returns `this` command for chaining
400
- */
401
- combineFlagAndOptionalValue(combine?: boolean): this;
402
-
403
- /**
404
- * Allow unknown options on the command line.
405
- *
406
- * @returns `this` command for chaining
407
- */
408
- allowUnknownOption(allowUnknown?: boolean): this;
409
-
410
- /**
411
- * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.
412
- *
413
- * @returns `this` command for chaining
414
- */
415
- allowExcessArguments(allowExcess?: boolean): this;
416
-
417
- /**
418
- * Enable positional options. Positional means global options are specified before subcommands which lets
419
- * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.
420
- *
421
- * The default behaviour is non-positional and global options may appear anywhere on the command line.
422
- *
423
- * @returns `this` command for chaining
424
- */
425
- enablePositionalOptions(positional?: boolean): this;
426
-
427
- /**
428
- * Pass through options that come after command-arguments rather than treat them as command-options,
429
- * so actual command-options come before command-arguments. Turning this on for a subcommand requires
430
- * positional options to have been enabled on the program (parent commands).
431
- *
432
- * The default behaviour is non-positional and options may appear before or after command-arguments.
433
- *
434
- * @returns `this` command for chaining
435
- */
436
- passThroughOptions(passThrough?: boolean): this;
437
-
438
- /**
439
- * Parse `argv`, setting options and invoking commands when defined.
440
- *
441
- * The default expectation is that the arguments are from node and have the application as argv[0]
442
- * and the script being run in argv[1], with user parameters after that.
443
- *
444
- * Examples:
445
- *
446
- * program.parse(process.argv);
447
- * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions
448
- * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
449
- *
450
- * @returns `this` command for chaining
451
- */
452
- parse(argv?: string[], options?: ParseOptions): this;
453
-
454
- /**
455
- * Parse `argv`, setting options and invoking commands when defined.
456
- *
457
- * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise.
458
- *
459
- * The default expectation is that the arguments are from node and have the application as argv[0]
460
- * and the script being run in argv[1], with user parameters after that.
461
- *
462
- * Examples:
463
- *
464
- * program.parseAsync(process.argv);
465
- * program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions
466
- * program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
467
- *
468
- * @returns Promise
469
- */
470
- parseAsync(argv?: string[], options?: ParseOptions): Promise<this>;
471
-
472
- /**
473
- * Parse options from `argv` removing known options,
474
- * and return argv split into operands and unknown arguments.
475
- *
476
- * @example
477
- * argv => operands, unknown
478
- * --known kkk op => [op], []
479
- * op --known kkk => [op], []
480
- * sub --unknown uuu op => [sub], [--unknown uuu op]
481
- * sub -- --unknown uuu op => [sub --unknown uuu op], []
482
- */
483
- parseOptions(argv: string[]): commander.ParseOptionsResult;
484
-
485
- /**
486
- * Return an object containing options as key-value pairs
487
- */
488
- opts(): OptionValues;
489
-
490
- /**
491
- * Set the description.
492
- *
493
- * @returns `this` command for chaining
494
- */
495
- description(str: string, argsDescription?: {[argName: string]: string}): this;
496
- /**
497
- * Get the description.
498
- */
499
- description(): string;
500
-
501
- /**
502
- * Set an alias for the command.
503
- *
504
- * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.
505
- *
506
- * @returns `this` command for chaining
507
- */
508
- alias(alias: string): this;
509
- /**
510
- * Get alias for the command.
511
- */
512
- alias(): string;
513
-
514
- /**
515
- * Set aliases for the command.
516
- *
517
- * Only the first alias is shown in the auto-generated help.
518
- *
519
- * @returns `this` command for chaining
520
- */
521
- aliases(aliases: string[]): this;
522
- /**
523
- * Get aliases for the command.
524
- */
525
- aliases(): string[];
526
-
527
- /**
528
- * Set the command usage.
529
- *
530
- * @returns `this` command for chaining
531
- */
532
- usage(str: string): this;
533
- /**
534
- * Get the command usage.
535
- */
536
- usage(): string;
537
-
538
- /**
539
- * Set the name of the command.
540
- *
541
- * @returns `this` command for chaining
542
- */
543
- name(str: string): this;
544
- /**
545
- * Get the name of the command.
546
- */
547
- name(): string;
548
-
549
- /**
550
- * Output help information for this command.
551
- *
552
- * Outputs built-in help, and custom text added using `.addHelpText()`.
553
- *
554
- */
555
- outputHelp(context?: HelpContext): void;
556
- /** @deprecated since v7 */
557
- outputHelp(cb?: (str: string) => string): void;
558
-
559
- /**
560
- * Return command help documentation.
561
- */
562
- helpInformation(context?: HelpContext): string;
563
-
564
- /**
565
- * You can pass in flags and a description to override the help
566
- * flags and help description for your command. Pass in false
567
- * to disable the built-in help option.
568
- */
569
- helpOption(flags?: string | boolean, description?: string): this;
570
-
571
- /**
572
- * Output help information and exit.
573
- *
574
- * Outputs built-in help, and custom text added using `.addHelpText()`.
575
- */
576
- help(context?: HelpContext): never;
577
- /** @deprecated since v7 */
578
- help(cb?: (str: string) => string): never;
579
-
580
- /**
581
- * Add additional text to be displayed with the built-in help.
582
- *
583
- * Position is 'before' or 'after' to affect just this command,
584
- * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.
585
- */
586
- addHelpText(position: AddHelpTextPosition, text: string): this;
587
- addHelpText(position: AddHelpTextPosition, text: (context: AddHelpTextContext) => string | undefined): this;
588
-
589
- /**
590
- * Add a listener (callback) for when events occur. (Implemented using EventEmitter.)
591
- */
592
- on(event: string | symbol, listener: (...args: any[]) => void): this;
593
- }
594
- type CommandConstructor = new (name?: string) => Command;
595
-
596
- interface CommandOptions {
597
- hidden?: boolean;
598
- isDefault?: boolean;
599
- /** @deprecated since v7, replaced by hidden */
600
- noHelp?: boolean;
601
- }
602
- interface ExecutableCommandOptions extends CommandOptions {
603
- executableFile?: string;
604
- }
605
-
606
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
607
- interface ParseOptionsResult {
608
- operands: string[];
609
- unknown: string[];
610
- }
611
-
612
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
613
- interface CommanderStatic extends Command {
614
- program: Command;
615
- Command: CommandConstructor;
616
- Option: OptionConstructor;
617
- CommanderError: CommanderErrorConstructor;
618
- InvalidOptionArgumentError: InvalidOptionArgumentErrorConstructor;
619
- Help: HelpConstructor;
620
- }
621
-
622
- }
623
-
624
- // Declaring namespace AND global
625
- // eslint-disable-next-line @typescript-eslint/no-redeclare
626
- declare const commander: commander.CommanderStatic;
627
- export = commander;