arcli 0.1.2 → 1.2.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 (292) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/LICENSE +21 -0
  3. package/README.md +169 -4
  4. package/dist/cli/commands/billing-family.command.d.ts +2 -0
  5. package/dist/cli/commands/billing-family.command.js +30 -0
  6. package/dist/cli/commands/billing-family.command.js.map +1 -0
  7. package/dist/cli/commands/billing-shortcuts.command.d.ts +2 -0
  8. package/dist/cli/commands/billing-shortcuts.command.js +18 -0
  9. package/dist/cli/commands/billing-shortcuts.command.js.map +1 -0
  10. package/dist/cli/commands/billing.command.interactive-preview.d.ts +18 -0
  11. package/dist/cli/commands/billing.command.interactive-preview.js +69 -0
  12. package/dist/cli/commands/billing.command.interactive-preview.js.map +1 -0
  13. package/dist/cli/commands/billing.command.options.d.ts +2 -0
  14. package/dist/cli/commands/billing.command.options.js +65 -0
  15. package/dist/cli/commands/billing.command.options.js.map +1 -0
  16. package/dist/cli/commands/billing.command.output.d.ts +12 -0
  17. package/dist/cli/commands/billing.command.output.js +33 -0
  18. package/dist/cli/commands/billing.command.output.js.map +1 -0
  19. package/dist/cli/commands/billing.command.parser.d.ts +21 -0
  20. package/dist/cli/commands/billing.command.parser.js +170 -0
  21. package/dist/cli/commands/billing.command.parser.js.map +1 -0
  22. package/dist/cli/commands/billing.command.shared.d.ts +7 -0
  23. package/dist/cli/commands/billing.command.shared.js +99 -0
  24. package/dist/cli/commands/billing.command.shared.js.map +1 -0
  25. package/dist/cli/commands/billing.command.shortcuts.d.ts +7 -0
  26. package/dist/cli/commands/billing.command.shortcuts.js +52 -0
  27. package/dist/cli/commands/billing.command.shortcuts.js.map +1 -0
  28. package/dist/cli/commands/config.command.d.ts +2 -0
  29. package/dist/cli/commands/config.command.js +125 -0
  30. package/dist/cli/commands/config.command.js.map +1 -0
  31. package/dist/cli/commands/examples.command.d.ts +2 -0
  32. package/dist/cli/commands/examples.command.js +14 -0
  33. package/dist/cli/commands/examples.command.js.map +1 -0
  34. package/dist/cli/commands/fce-obligation.command.d.ts +2 -0
  35. package/dist/cli/commands/fce-obligation.command.js +51 -0
  36. package/dist/cli/commands/fce-obligation.command.js.map +1 -0
  37. package/dist/cli/commands/storybook.command.d.ts +2 -0
  38. package/dist/cli/commands/storybook.command.js +26 -0
  39. package/dist/cli/commands/storybook.command.js.map +1 -0
  40. package/dist/cli/help.d.ts +11 -0
  41. package/dist/cli/help.js +534 -0
  42. package/dist/cli/help.js.map +1 -0
  43. package/dist/cli/index.d.ts +2 -0
  44. package/dist/cli/index.js +41 -0
  45. package/dist/cli/index.js.map +1 -0
  46. package/dist/cli/program.d.ts +2 -0
  47. package/dist/cli/program.js +30 -0
  48. package/dist/cli/program.js.map +1 -0
  49. package/dist/cli/types.d.ts +6 -0
  50. package/dist/cli/types.js +2 -0
  51. package/dist/cli/types.js.map +1 -0
  52. package/dist/cli/version.d.ts +1 -0
  53. package/dist/cli/version.js +2 -0
  54. package/dist/cli/version.js.map +1 -0
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.js +2 -0
  57. package/dist/index.js.map +1 -0
  58. package/dist/lib/dates/arca-date.d.ts +6 -0
  59. package/dist/lib/dates/arca-date.js +45 -0
  60. package/dist/lib/dates/arca-date.js.map +1 -0
  61. package/dist/lib/errors/app-error.d.ts +14 -0
  62. package/dist/lib/errors/app-error.js +29 -0
  63. package/dist/lib/errors/app-error.js.map +1 -0
  64. package/dist/lib/files/read-json-file.d.ts +1 -0
  65. package/dist/lib/files/read-json-file.js +21 -0
  66. package/dist/lib/files/read-json-file.js.map +1 -0
  67. package/dist/lib/paths/mask-path.d.ts +1 -0
  68. package/dist/lib/paths/mask-path.js +17 -0
  69. package/dist/lib/paths/mask-path.js.map +1 -0
  70. package/dist/lib/security/certificate.d.ts +7 -0
  71. package/dist/lib/security/certificate.js +16 -0
  72. package/dist/lib/security/certificate.js.map +1 -0
  73. package/dist/lib/security/pem.d.ts +5 -0
  74. package/dist/lib/security/pem.js +36 -0
  75. package/dist/lib/security/pem.js.map +1 -0
  76. package/dist/modules/billing/billing-response.d.ts +4 -0
  77. package/dist/modules/billing/billing-response.js +74 -0
  78. package/dist/modules/billing/billing-response.js.map +1 -0
  79. package/dist/modules/billing/billing.amounts.d.ts +19 -0
  80. package/dist/modules/billing/billing.amounts.js +72 -0
  81. package/dist/modules/billing/billing.amounts.js.map +1 -0
  82. package/dist/modules/billing/billing.associated-period.d.ts +8 -0
  83. package/dist/modules/billing/billing.associated-period.js +40 -0
  84. package/dist/modules/billing/billing.associated-period.js.map +1 -0
  85. package/dist/modules/billing/billing.associated-vouchers.d.ts +12 -0
  86. package/dist/modules/billing/billing.associated-vouchers.js +73 -0
  87. package/dist/modules/billing/billing.associated-vouchers.js.map +1 -0
  88. package/dist/modules/billing/billing.constants.d.ts +2 -0
  89. package/dist/modules/billing/billing.constants.js +3 -0
  90. package/dist/modules/billing/billing.constants.js.map +1 -0
  91. package/dist/modules/billing/billing.currency.d.ts +18 -0
  92. package/dist/modules/billing/billing.currency.js +53 -0
  93. package/dist/modules/billing/billing.currency.js.map +1 -0
  94. package/dist/modules/billing/billing.date-range.d.ts +9 -0
  95. package/dist/modules/billing/billing.date-range.js +52 -0
  96. package/dist/modules/billing/billing.date-range.js.map +1 -0
  97. package/dist/modules/billing/billing.display.d.ts +13 -0
  98. package/dist/modules/billing/billing.display.js +137 -0
  99. package/dist/modules/billing/billing.display.js.map +1 -0
  100. package/dist/modules/billing/billing.fce.d.ts +21 -0
  101. package/dist/modules/billing/billing.fce.js +59 -0
  102. package/dist/modules/billing/billing.fce.js.map +1 -0
  103. package/dist/modules/billing/billing.iva-receptor.d.ts +7 -0
  104. package/dist/modules/billing/billing.iva-receptor.js +58 -0
  105. package/dist/modules/billing/billing.iva-receptor.js.map +1 -0
  106. package/dist/modules/billing/billing.json-format.d.ts +6 -0
  107. package/dist/modules/billing/billing.json-format.js +5 -0
  108. package/dist/modules/billing/billing.json-format.js.map +1 -0
  109. package/dist/modules/billing/billing.labels.d.ts +9 -0
  110. package/dist/modules/billing/billing.labels.js +108 -0
  111. package/dist/modules/billing/billing.labels.js.map +1 -0
  112. package/dist/modules/billing/billing.mappers.d.ts +8 -0
  113. package/dist/modules/billing/billing.mappers.js +60 -0
  114. package/dist/modules/billing/billing.mappers.js.map +1 -0
  115. package/dist/modules/billing/billing.presenter.d.ts +7 -0
  116. package/dist/modules/billing/billing.presenter.js +3 -0
  117. package/dist/modules/billing/billing.presenter.js.map +1 -0
  118. package/dist/modules/billing/billing.schemas.d.ts +107 -0
  119. package/dist/modules/billing/billing.schemas.js +106 -0
  120. package/dist/modules/billing/billing.schemas.js.map +1 -0
  121. package/dist/modules/billing/billing.serialize.d.ts +8 -0
  122. package/dist/modules/billing/billing.serialize.js +53 -0
  123. package/dist/modules/billing/billing.serialize.js.map +1 -0
  124. package/dist/modules/billing/billing.service.d.ts +27 -0
  125. package/dist/modules/billing/billing.service.js +146 -0
  126. package/dist/modules/billing/billing.service.js.map +1 -0
  127. package/dist/modules/billing/billing.text.d.ts +8 -0
  128. package/dist/modules/billing/billing.text.js +52 -0
  129. package/dist/modules/billing/billing.text.js.map +1 -0
  130. package/dist/modules/billing/billing.types.d.ts +13 -0
  131. package/dist/modules/billing/billing.types.internal.d.ts +27 -0
  132. package/dist/modules/billing/billing.types.internal.js +2 -0
  133. package/dist/modules/billing/billing.types.internal.js.map +1 -0
  134. package/dist/modules/billing/billing.types.js +2 -0
  135. package/dist/modules/billing/billing.types.js.map +1 -0
  136. package/dist/modules/billing/billing.validation.d.ts +7 -0
  137. package/dist/modules/billing/billing.validation.js +80 -0
  138. package/dist/modules/billing/billing.validation.js.map +1 -0
  139. package/dist/modules/billing/voucher-kind-map.d.ts +9 -0
  140. package/dist/modules/billing/voucher-kind-map.js +180 -0
  141. package/dist/modules/billing/voucher-kind-map.js.map +1 -0
  142. package/dist/modules/config/config-doctor.d.ts +15 -0
  143. package/dist/modules/config/config-doctor.js +125 -0
  144. package/dist/modules/config/config-doctor.js.map +1 -0
  145. package/dist/modules/config/config-value-parser.d.ts +2 -0
  146. package/dist/modules/config/config-value-parser.js +99 -0
  147. package/dist/modules/config/config-value-parser.js.map +1 -0
  148. package/dist/modules/config/config.presenter.d.ts +7 -0
  149. package/dist/modules/config/config.presenter.js +88 -0
  150. package/dist/modules/config/config.presenter.js.map +1 -0
  151. package/dist/modules/config/config.schemas.d.ts +110 -0
  152. package/dist/modules/config/config.schemas.js +103 -0
  153. package/dist/modules/config/config.schemas.js.map +1 -0
  154. package/dist/modules/config/config.service.d.ts +20 -0
  155. package/dist/modules/config/config.service.js +82 -0
  156. package/dist/modules/config/config.service.js.map +1 -0
  157. package/dist/modules/examples/examples.d.ts +1 -0
  158. package/dist/modules/examples/examples.js +191 -0
  159. package/dist/modules/examples/examples.js.map +1 -0
  160. package/dist/modules/fce/fce-obligation.d.ts +20 -0
  161. package/dist/modules/fce/fce-obligation.js +33 -0
  162. package/dist/modules/fce/fce-obligation.js.map +1 -0
  163. package/dist/modules/fce/fce-obligation.presenter.d.ts +9 -0
  164. package/dist/modules/fce/fce-obligation.presenter.js +32 -0
  165. package/dist/modules/fce/fce-obligation.presenter.js.map +1 -0
  166. package/dist/modules/storybook/showcase-theme.d.ts +7 -0
  167. package/dist/modules/storybook/showcase-theme.js +6 -0
  168. package/dist/modules/storybook/showcase-theme.js.map +1 -0
  169. package/dist/modules/storybook/showcase.d.ts +2 -0
  170. package/dist/modules/storybook/showcase.js +310 -0
  171. package/dist/modules/storybook/showcase.js.map +1 -0
  172. package/dist/modules/update-check/update-check.presenter.d.ts +2 -0
  173. package/dist/modules/update-check/update-check.presenter.js +6 -0
  174. package/dist/modules/update-check/update-check.presenter.js.map +1 -0
  175. package/dist/modules/update-check/update-check.service.d.ts +8 -0
  176. package/dist/modules/update-check/update-check.service.js +72 -0
  177. package/dist/modules/update-check/update-check.service.js.map +1 -0
  178. package/dist/services/arca/arca-billing.gateway.d.ts +10 -0
  179. package/dist/services/arca/arca-billing.gateway.js +22 -0
  180. package/dist/services/arca/arca-billing.gateway.js.map +1 -0
  181. package/dist/services/arca/arca-client.factory.d.ts +5 -0
  182. package/dist/services/arca/arca-client.factory.js +7 -0
  183. package/dist/services/arca/arca-client.factory.js.map +1 -0
  184. package/dist/services/arca/arca-context.resolver.d.ts +44 -0
  185. package/dist/services/arca/arca-context.resolver.js +120 -0
  186. package/dist/services/arca/arca-context.resolver.js.map +1 -0
  187. package/dist/services/arca/arca-fce-obligation.gateway.d.ts +7 -0
  188. package/dist/services/arca/arca-fce-obligation.gateway.js +36 -0
  189. package/dist/services/arca/arca-fce-obligation.gateway.js.map +1 -0
  190. package/dist/ui/components/contentPanel.d.ts +5 -0
  191. package/dist/ui/components/contentPanel.js +11 -0
  192. package/dist/ui/components/contentPanel.js.map +1 -0
  193. package/dist/ui/components/errorPanel.d.ts +1 -0
  194. package/dist/ui/components/errorPanel.js +13 -0
  195. package/dist/ui/components/errorPanel.js.map +1 -0
  196. package/dist/ui/components/index.d.ts +6 -0
  197. package/dist/ui/components/index.js +7 -0
  198. package/dist/ui/components/index.js.map +1 -0
  199. package/dist/ui/components/keyValuePanel.d.ts +3 -0
  200. package/dist/ui/components/keyValuePanel.js +14 -0
  201. package/dist/ui/components/keyValuePanel.js.map +1 -0
  202. package/dist/ui/components/noticePanel.d.ts +3 -0
  203. package/dist/ui/components/noticePanel.js +11 -0
  204. package/dist/ui/components/noticePanel.js.map +1 -0
  205. package/dist/ui/components/rawPanel.d.ts +1 -0
  206. package/dist/ui/components/rawPanel.js +5 -0
  207. package/dist/ui/components/rawPanel.js.map +1 -0
  208. package/dist/ui/components/statusPanel.d.ts +3 -0
  209. package/dist/ui/components/statusPanel.js +20 -0
  210. package/dist/ui/components/statusPanel.js.map +1 -0
  211. package/dist/ui/index.d.ts +5 -0
  212. package/dist/ui/index.js +6 -0
  213. package/dist/ui/index.js.map +1 -0
  214. package/dist/ui/presenters/billing.presenter.d.ts +2 -0
  215. package/dist/ui/presenters/billing.presenter.js +2 -0
  216. package/dist/ui/presenters/billing.presenter.js.map +1 -0
  217. package/dist/ui/presenters/config.presenter.d.ts +1 -0
  218. package/dist/ui/presenters/config.presenter.js +2 -0
  219. package/dist/ui/presenters/config.presenter.js.map +1 -0
  220. package/dist/ui/presenters/errors.presenter.d.ts +1 -0
  221. package/dist/ui/presenters/errors.presenter.js +89 -0
  222. package/dist/ui/presenters/errors.presenter.js.map +1 -0
  223. package/dist/ui/presenters/errors.zod-presenter.d.ts +2 -0
  224. package/dist/ui/presenters/errors.zod-presenter.js +103 -0
  225. package/dist/ui/presenters/errors.zod-presenter.js.map +1 -0
  226. package/dist/ui/presenters/index.d.ts +4 -0
  227. package/dist/ui/presenters/index.js +5 -0
  228. package/dist/ui/presenters/index.js.map +1 -0
  229. package/dist/ui/presenters/showcase.presenter.d.ts +1 -0
  230. package/dist/ui/presenters/showcase.presenter.js +2 -0
  231. package/dist/ui/presenters/showcase.presenter.js.map +1 -0
  232. package/dist/ui/primitives/index.d.ts +10 -0
  233. package/dist/ui/primitives/index.js +11 -0
  234. package/dist/ui/primitives/index.js.map +1 -0
  235. package/dist/ui/primitives/renderDivider.d.ts +5 -0
  236. package/dist/ui/primitives/renderDivider.js +5 -0
  237. package/dist/ui/primitives/renderDivider.js.map +1 -0
  238. package/dist/ui/primitives/renderFooter.d.ts +7 -0
  239. package/dist/ui/primitives/renderFooter.js +6 -0
  240. package/dist/ui/primitives/renderFooter.js.map +1 -0
  241. package/dist/ui/primitives/renderJson.d.ts +3 -0
  242. package/dist/ui/primitives/renderJson.js +19 -0
  243. package/dist/ui/primitives/renderJson.js.map +1 -0
  244. package/dist/ui/primitives/renderKeyValue.d.ts +14 -0
  245. package/dist/ui/primitives/renderKeyValue.js +34 -0
  246. package/dist/ui/primitives/renderKeyValue.js.map +1 -0
  247. package/dist/ui/primitives/renderLogo.d.ts +2 -0
  248. package/dist/ui/primitives/renderLogo.js +28 -0
  249. package/dist/ui/primitives/renderLogo.js.map +1 -0
  250. package/dist/ui/primitives/renderObject.d.ts +1 -0
  251. package/dist/ui/primitives/renderObject.js +19 -0
  252. package/dist/ui/primitives/renderObject.js.map +1 -0
  253. package/dist/ui/primitives/renderPanel.d.ts +23 -0
  254. package/dist/ui/primitives/renderPanel.js +114 -0
  255. package/dist/ui/primitives/renderPanel.js.map +1 -0
  256. package/dist/ui/primitives/renderSubtitle.d.ts +7 -0
  257. package/dist/ui/primitives/renderSubtitle.js +6 -0
  258. package/dist/ui/primitives/renderSubtitle.js.map +1 -0
  259. package/dist/ui/primitives/renderTable.d.ts +6 -0
  260. package/dist/ui/primitives/renderTable.js +14 -0
  261. package/dist/ui/primitives/renderTable.js.map +1 -0
  262. package/dist/ui/primitives/text.d.ts +18 -0
  263. package/dist/ui/primitives/text.js +154 -0
  264. package/dist/ui/primitives/text.js.map +1 -0
  265. package/dist/ui/stream/index.d.ts +1 -0
  266. package/dist/ui/stream/index.js +2 -0
  267. package/dist/ui/stream/index.js.map +1 -0
  268. package/dist/ui/stream/terminal-stream.d.ts +10 -0
  269. package/dist/ui/stream/terminal-stream.js +20 -0
  270. package/dist/ui/stream/terminal-stream.js.map +1 -0
  271. package/dist/ui/theme/index.d.ts +1 -0
  272. package/dist/ui/theme/index.js +2 -0
  273. package/dist/ui/theme/index.js.map +1 -0
  274. package/dist/ui/theme/theme.d.ts +27 -0
  275. package/dist/ui/theme/theme.js +41 -0
  276. package/dist/ui/theme/theme.js.map +1 -0
  277. package/llms.txt +161 -0
  278. package/package.json +99 -35
  279. package/.babelrc +0 -4
  280. package/.eslintignore +0 -1
  281. package/.eslintrc.js +0 -17
  282. package/.npmignore +0 -1
  283. package/lib/arcli.js +0 -275
  284. package/lib/arcli.min.js +0 -1
  285. package/src/config.js +0 -22
  286. package/src/consoler.js +0 -10
  287. package/src/index.js +0 -21
  288. package/src/init.js +0 -13
  289. package/src/run.js +0 -4
  290. package/src/spinner.js +0 -39
  291. package/tst/index.js +0 -26
  292. package/webpack.config.js +0 -47
package/lib/arcli.js DELETED
@@ -1,275 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define("arcli", [], factory);
6
- else if(typeof exports === 'object')
7
- exports["arcli"] = factory();
8
- else
9
- root["arcli"] = factory();
10
- })(this, function() {
11
- return /******/ (function(modules) { // webpackBootstrap
12
- /******/ // The module cache
13
- /******/ var installedModules = {};
14
- /******/
15
- /******/ // The require function
16
- /******/ function __webpack_require__(moduleId) {
17
- /******/
18
- /******/ // Check if module is in cache
19
- /******/ if(installedModules[moduleId]) {
20
- /******/ return installedModules[moduleId].exports;
21
- /******/ }
22
- /******/ // Create a new module (and put it into the cache)
23
- /******/ var module = installedModules[moduleId] = {
24
- /******/ i: moduleId,
25
- /******/ l: false,
26
- /******/ exports: {}
27
- /******/ };
28
- /******/
29
- /******/ // Execute the module function
30
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
- /******/
32
- /******/ // Flag the module as loaded
33
- /******/ module.l = true;
34
- /******/
35
- /******/ // Return the exports of the module
36
- /******/ return module.exports;
37
- /******/ }
38
- /******/
39
- /******/
40
- /******/ // expose the modules object (__webpack_modules__)
41
- /******/ __webpack_require__.m = modules;
42
- /******/
43
- /******/ // expose the module cache
44
- /******/ __webpack_require__.c = installedModules;
45
- /******/
46
- /******/ // define getter function for harmony exports
47
- /******/ __webpack_require__.d = function(exports, name, getter) {
48
- /******/ if(!__webpack_require__.o(exports, name)) {
49
- /******/ Object.defineProperty(exports, name, {
50
- /******/ configurable: false,
51
- /******/ enumerable: true,
52
- /******/ get: getter
53
- /******/ });
54
- /******/ }
55
- /******/ };
56
- /******/
57
- /******/ // getDefaultExport function for compatibility with non-harmony modules
58
- /******/ __webpack_require__.n = function(module) {
59
- /******/ var getter = module && module.__esModule ?
60
- /******/ function getDefault() { return module['default']; } :
61
- /******/ function getModuleExports() { return module; };
62
- /******/ __webpack_require__.d(getter, 'a', getter);
63
- /******/ return getter;
64
- /******/ };
65
- /******/
66
- /******/ // Object.prototype.hasOwnProperty.call
67
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
68
- /******/
69
- /******/ // __webpack_public_path__
70
- /******/ __webpack_require__.p = "";
71
- /******/
72
- /******/ // Load entry module and return exports
73
- /******/ return __webpack_require__(__webpack_require__.s = 6);
74
- /******/ })
75
- /************************************************************************/
76
- /******/ ([
77
- /* 0 */
78
- /***/ (function(module, exports, __webpack_require__) {
79
-
80
- "use strict";
81
-
82
-
83
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
84
-
85
- var configInstance = {};
86
-
87
- module.exports = {
88
- add: function add(configurations) {
89
- configInstance = _extends({}, configInstance, configurations);
90
- },
91
- get: function get(key, defaultValue) {
92
- var tokens = key.split('.');
93
- var tempConfig = configInstance;
94
- for (var i = 0; i < tokens.length; i += 1) {
95
- var token = tokens[i];
96
- tempConfig = tempConfig[token];
97
- if (tempConfig === undefined) {
98
- return defaultValue;
99
- }
100
- }
101
- return tempConfig;
102
- }
103
- };
104
-
105
- /***/ }),
106
- /* 1 */
107
- /***/ (function(module, exports) {
108
-
109
- module.exports = require("chalk");
110
-
111
- /***/ }),
112
- /* 2 */
113
- /***/ (function(module, exports) {
114
-
115
- module.exports = require("node-emoji");
116
-
117
- /***/ }),
118
- /* 3 */
119
- /***/ (function(module, exports) {
120
-
121
- module.exports = require("commander");
122
-
123
- /***/ }),
124
- /* 4 */
125
- /***/ (function(module, exports, __webpack_require__) {
126
-
127
- "use strict";
128
-
129
-
130
- var arcliConfig = __webpack_require__(0);
131
-
132
- var proc = null;
133
-
134
- module.exports = {
135
- setup: function setup(arcliProcess, configurations) {
136
- proc = arcliProcess;
137
- arcliConfig.add(configurations);
138
- },
139
- getArgv: function getArgv() {
140
- return proc.argv;
141
- }
142
- };
143
-
144
- /***/ }),
145
- /* 5 */
146
- /***/ (function(module, exports, __webpack_require__) {
147
-
148
- "use strict";
149
-
150
-
151
- var chalk = __webpack_require__(1);
152
- var emoji = __webpack_require__(2);
153
-
154
- module.exports = {
155
- success: function success(text) {
156
- return console.log(emoji.get('sign_of_the_horns') + ' ' + chalk.green.bold(text));
157
- },
158
- fail: function fail(text) {
159
- return console.log(emoji.get('pensive') + ' ' + chalk.red.bold(text));
160
- },
161
- message: function message(text) {
162
- return console.log('' + chalk.white.bold(text));
163
- },
164
- tell: function tell(text) {
165
- return console.log(emoji.get('loudspeaker') + ' ' + chalk.yellow.bold(text));
166
- },
167
- plain: function plain(text) {
168
- return console.log(text);
169
- }
170
- };
171
-
172
- /***/ }),
173
- /* 6 */
174
- /***/ (function(module, exports, __webpack_require__) {
175
-
176
- "use strict";
177
-
178
-
179
- var Chalk = __webpack_require__(1);
180
- var Emoji = __webpack_require__(2);
181
- var Commander = __webpack_require__(3);
182
-
183
- var init = __webpack_require__(4);
184
- var run = __webpack_require__(7);
185
- var Consoler = __webpack_require__(5);
186
- var Config = __webpack_require__(0);
187
- var Spinner = __webpack_require__(8);
188
-
189
- module.exports = {
190
- init: init,
191
- run: run,
192
- Consoler: Consoler,
193
- Commander: Commander,
194
- Config: Config,
195
- Spinner: Spinner,
196
- Chalk: Chalk,
197
- Emoji: Emoji
198
- };
199
-
200
- /***/ }),
201
- /* 7 */
202
- /***/ (function(module, exports, __webpack_require__) {
203
-
204
- "use strict";
205
-
206
-
207
- var init = __webpack_require__(4);
208
- var Commander = __webpack_require__(3);
209
-
210
- module.exports = function () {
211
- return Commander.parse(init.getArgv());
212
- };
213
-
214
- /***/ }),
215
- /* 8 */
216
- /***/ (function(module, exports, __webpack_require__) {
217
-
218
- "use strict";
219
-
220
-
221
- var ora = __webpack_require__(9);
222
- var config = __webpack_require__(0);
223
- var Consoler = __webpack_require__(5);
224
-
225
- var _instance = null;
226
-
227
- function stopAndPrint(text, consolerFunction) {
228
- var fancy = config.get('fancy', false);
229
- if (!fancy) {
230
- return Consoler.plain(text);
231
- }
232
- if (!_instance) {
233
- _instance = ora(text);
234
- }
235
- _instance.stop();
236
- return consolerFunction(text);
237
- }
238
-
239
- module.exports = {
240
- start: function start(text) {
241
- var fancy = config.get('fancy', false);
242
- if (!fancy) {
243
- return Consoler.plain(text);
244
- }
245
- if (!_instance) {
246
- _instance = ora(text);
247
- }
248
- return _instance.start(text);
249
- },
250
- success: function success(text) {
251
- return stopAndPrint(text, Consoler.success);
252
- },
253
- fail: function fail(text) {
254
- return stopAndPrint(text, Consoler.fail);
255
- },
256
- message: function message(text) {
257
- return stopAndPrint(text, Consoler.message);
258
- },
259
- tell: function tell(text) {
260
- return stopAndPrint(text, Consoler.tell);
261
- },
262
- plain: function plain(text) {
263
- return stopAndPrint(text, Consoler.plain);
264
- }
265
- };
266
-
267
- /***/ }),
268
- /* 9 */
269
- /***/ (function(module, exports) {
270
-
271
- module.exports = require("ora");
272
-
273
- /***/ })
274
- /******/ ]);
275
- });
package/lib/arcli.min.js DELETED
@@ -1 +0,0 @@
1
- !function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("arcli",[],t):"object"==typeof exports?exports.arcli=t():n.arcli=t()}(this,function(){return function(n){function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e={};return t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=6)}([function(n,t,e){"use strict";var r=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},o={};n.exports={add:function(n){o=r({},o,n)},get:function(n,t){for(var e=n.split("."),r=o,u=0;u<e.length;u+=1){if(void 0===(r=r[e[u]]))return t}return r}}},function(n,t){n.exports=require("chalk")},function(n,t){n.exports=require("node-emoji")},function(n,t){n.exports=require("commander")},function(n,t,e){"use strict";var r=e(0),o=null;n.exports={setup:function(n,t){o=n,r.add(t)},getArgv:function(){return o.argv}}},function(n,t,e){"use strict";var r=e(1),o=e(2);n.exports={success:function(n){return console.log(o.get("sign_of_the_horns")+" "+r.green.bold(n))},fail:function(n){return console.log(o.get("pensive")+" "+r.red.bold(n))},message:function(n){return console.log(""+r.white.bold(n))},tell:function(n){return console.log(o.get("loudspeaker")+" "+r.yellow.bold(n))},plain:function(n){return console.log(n)}}},function(n,t,e){"use strict";var r=e(1),o=e(2),u=e(3),i=e(4),c=e(7),s=e(5),f=e(0),l=e(8);n.exports={init:i,run:c,Consoler:s,Commander:u,Config:f,Spinner:l,Chalk:r,Emoji:o}},function(n,t,e){"use strict";var r=e(4),o=e(3);n.exports=function(){return o.parse(r.getArgv())}},function(n,t,e){"use strict";function r(n,t){return u.get("fancy",!1)?(c||(c=o(n)),c.stop(),t(n)):i.plain(n)}var o=e(9),u=e(0),i=e(5),c=null;n.exports={start:function(n){return u.get("fancy",!1)?(c||(c=o(n)),c.start(n)):i.plain(n)},success:function(n){return r(n,i.success)},fail:function(n){return r(n,i.fail)},message:function(n){return r(n,i.message)},tell:function(n){return r(n,i.tell)},plain:function(n){return r(n,i.plain)}}},function(n,t){n.exports=require("ora")}])});
package/src/config.js DELETED
@@ -1,22 +0,0 @@
1
- let configInstance = {};
2
-
3
- module.exports = {
4
- add(configurations) {
5
- configInstance = {
6
- ...configInstance,
7
- ...configurations,
8
- };
9
- },
10
- get(key, defaultValue) {
11
- const tokens = key.split('.');
12
- let tempConfig = configInstance;
13
- for (let i = 0; i < tokens.length; i += 1) {
14
- const token = tokens[i];
15
- tempConfig = tempConfig[token];
16
- if (tempConfig === undefined) {
17
- return defaultValue;
18
- }
19
- }
20
- return tempConfig;
21
- },
22
- };
package/src/consoler.js DELETED
@@ -1,10 +0,0 @@
1
- const chalk = require('chalk');
2
- const emoji = require('node-emoji');
3
-
4
- module.exports = {
5
- success: text => console.log(`${emoji.get('sign_of_the_horns')} ${chalk.green.bold(text)}`),
6
- fail: text => console.log(`${emoji.get('pensive')} ${chalk.red.bold(text)}`),
7
- message: text => console.log(`${chalk.white.bold(text)}`),
8
- tell: text => console.log(`${emoji.get('loudspeaker')} ${chalk.yellow.bold(text)}`),
9
- plain: text => console.log(text),
10
- };
package/src/index.js DELETED
@@ -1,21 +0,0 @@
1
- const Chalk = require('chalk');
2
- const Emoji = require('node-emoji');
3
- const Commander = require('commander');
4
-
5
- const init = require('./init');
6
- const run = require('./run');
7
- const Consoler = require('./consoler');
8
- const Config = require('./config');
9
- const Spinner = require('./spinner');
10
-
11
-
12
- module.exports = {
13
- init,
14
- run,
15
- Consoler,
16
- Commander,
17
- Config,
18
- Spinner,
19
- Chalk,
20
- Emoji,
21
- };
package/src/init.js DELETED
@@ -1,13 +0,0 @@
1
- const arcliConfig = require('./config');
2
-
3
- let proc = null;
4
-
5
- module.exports = {
6
- setup: (arcliProcess, configurations) => {
7
- proc = arcliProcess;
8
- arcliConfig.add(configurations);
9
- },
10
- getArgv() {
11
- return proc.argv;
12
- },
13
- };
package/src/run.js DELETED
@@ -1,4 +0,0 @@
1
- const init = require('./init');
2
- const Commander = require('commander');
3
-
4
- module.exports = () => Commander.parse(init.getArgv());
package/src/spinner.js DELETED
@@ -1,39 +0,0 @@
1
- const ora = require('ora');
2
- const config = require('./config');
3
- const Consoler = require('./consoler');
4
-
5
- let _instance = null;
6
-
7
- function stopAndPrint(text, consolerFunction) {
8
- const fancy = config.get('fancy', false);
9
- if (!fancy) { return Consoler.plain(text); }
10
- if (!_instance) { _instance = ora(text); }
11
- _instance.stop();
12
- return consolerFunction(text);
13
- }
14
-
15
- module.exports = {
16
- start(text) {
17
- const fancy = config.get('fancy', false);
18
- if (!fancy) { return Consoler.plain(text); }
19
- if (!_instance) {
20
- _instance = ora(text);
21
- }
22
- return _instance.start(text);
23
- },
24
- success(text) {
25
- return stopAndPrint(text, Consoler.success);
26
- },
27
- fail(text) {
28
- return stopAndPrint(text, Consoler.fail);
29
- },
30
- message(text) {
31
- return stopAndPrint(text, Consoler.message);
32
- },
33
- tell(text) {
34
- return stopAndPrint(text, Consoler.tell);
35
- },
36
- plain(text) {
37
- return stopAndPrint(text, Consoler.plain);
38
- },
39
- };
package/tst/index.js DELETED
@@ -1,26 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const arcli = require('../lib/arcli')
4
-
5
- arcli.init.setup(process, {
6
- fancy: true
7
- });
8
-
9
- const { Commander, Consoler, Spinner } = arcli;
10
-
11
- Commander
12
- .command('ping')
13
- .description('Sends a ping and prints pong')
14
- .action(() => {
15
- Consoler.tell("tell")
16
- Consoler.success("success")
17
- Consoler.fail("fail")
18
- Consoler.message("message")
19
- Consoler.plain("plain")
20
- Spinner.start("Drinking 10 beers ...")
21
- setTimeout(() => {
22
- Spinner.success("I'm drunk!");
23
- }, 1000);
24
- });
25
-
26
- arcli.run()
package/webpack.config.js DELETED
@@ -1,47 +0,0 @@
1
- const webpack = require('webpack');
2
- const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
3
- const path = require('path');
4
- const env = require('yargs').argv.env;
5
- const nodeExternals = require('webpack-node-externals');
6
-
7
- let libraryName = 'arcli';
8
-
9
- let plugins = [], outputFile;
10
-
11
- if (env === 'build') {
12
- plugins.push(new UglifyJsPlugin({ minimize: true }));
13
- outputFile = libraryName + '.min.js';
14
- } else {
15
- outputFile = libraryName + '.js';
16
- }
17
-
18
- const config = {
19
- externals: [nodeExternals()],
20
- entry: __dirname + '/src/index.js',
21
- output: {
22
- path: __dirname + '/lib',
23
- filename: outputFile,
24
- library: libraryName,
25
- libraryTarget: 'umd',
26
- umdNamedDefine: true
27
- },
28
- module: {
29
- rules: [
30
- {
31
- test: /(\.js)$/,
32
- loader: 'babel-loader',
33
- },
34
- {
35
- test: /(\.js)$/,
36
- loader: 'eslint-loader',
37
- }
38
- ]
39
- },
40
- resolve: {
41
- modules: [path.resolve('./node_modules'), path.resolve('./src')],
42
- extensions: ['.js']
43
- },
44
- plugins: plugins
45
- };
46
-
47
- module.exports = config;