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.
- package/CHANGELOG.md +78 -0
- package/LICENSE +21 -0
- package/README.md +169 -4
- package/dist/cli/commands/billing-family.command.d.ts +2 -0
- package/dist/cli/commands/billing-family.command.js +30 -0
- package/dist/cli/commands/billing-family.command.js.map +1 -0
- package/dist/cli/commands/billing-shortcuts.command.d.ts +2 -0
- package/dist/cli/commands/billing-shortcuts.command.js +18 -0
- package/dist/cli/commands/billing-shortcuts.command.js.map +1 -0
- package/dist/cli/commands/billing.command.interactive-preview.d.ts +18 -0
- package/dist/cli/commands/billing.command.interactive-preview.js +69 -0
- package/dist/cli/commands/billing.command.interactive-preview.js.map +1 -0
- package/dist/cli/commands/billing.command.options.d.ts +2 -0
- package/dist/cli/commands/billing.command.options.js +65 -0
- package/dist/cli/commands/billing.command.options.js.map +1 -0
- package/dist/cli/commands/billing.command.output.d.ts +12 -0
- package/dist/cli/commands/billing.command.output.js +33 -0
- package/dist/cli/commands/billing.command.output.js.map +1 -0
- package/dist/cli/commands/billing.command.parser.d.ts +21 -0
- package/dist/cli/commands/billing.command.parser.js +170 -0
- package/dist/cli/commands/billing.command.parser.js.map +1 -0
- package/dist/cli/commands/billing.command.shared.d.ts +7 -0
- package/dist/cli/commands/billing.command.shared.js +99 -0
- package/dist/cli/commands/billing.command.shared.js.map +1 -0
- package/dist/cli/commands/billing.command.shortcuts.d.ts +7 -0
- package/dist/cli/commands/billing.command.shortcuts.js +52 -0
- package/dist/cli/commands/billing.command.shortcuts.js.map +1 -0
- package/dist/cli/commands/config.command.d.ts +2 -0
- package/dist/cli/commands/config.command.js +125 -0
- package/dist/cli/commands/config.command.js.map +1 -0
- package/dist/cli/commands/examples.command.d.ts +2 -0
- package/dist/cli/commands/examples.command.js +14 -0
- package/dist/cli/commands/examples.command.js.map +1 -0
- package/dist/cli/commands/fce-obligation.command.d.ts +2 -0
- package/dist/cli/commands/fce-obligation.command.js +51 -0
- package/dist/cli/commands/fce-obligation.command.js.map +1 -0
- package/dist/cli/commands/storybook.command.d.ts +2 -0
- package/dist/cli/commands/storybook.command.js +26 -0
- package/dist/cli/commands/storybook.command.js.map +1 -0
- package/dist/cli/help.d.ts +11 -0
- package/dist/cli/help.js +534 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +41 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/program.d.ts +2 -0
- package/dist/cli/program.js +30 -0
- package/dist/cli/program.js.map +1 -0
- package/dist/cli/types.d.ts +6 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/cli/version.d.ts +1 -0
- package/dist/cli/version.js +2 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/dates/arca-date.d.ts +6 -0
- package/dist/lib/dates/arca-date.js +45 -0
- package/dist/lib/dates/arca-date.js.map +1 -0
- package/dist/lib/errors/app-error.d.ts +14 -0
- package/dist/lib/errors/app-error.js +29 -0
- package/dist/lib/errors/app-error.js.map +1 -0
- package/dist/lib/files/read-json-file.d.ts +1 -0
- package/dist/lib/files/read-json-file.js +21 -0
- package/dist/lib/files/read-json-file.js.map +1 -0
- package/dist/lib/paths/mask-path.d.ts +1 -0
- package/dist/lib/paths/mask-path.js +17 -0
- package/dist/lib/paths/mask-path.js.map +1 -0
- package/dist/lib/security/certificate.d.ts +7 -0
- package/dist/lib/security/certificate.js +16 -0
- package/dist/lib/security/certificate.js.map +1 -0
- package/dist/lib/security/pem.d.ts +5 -0
- package/dist/lib/security/pem.js +36 -0
- package/dist/lib/security/pem.js.map +1 -0
- package/dist/modules/billing/billing-response.d.ts +4 -0
- package/dist/modules/billing/billing-response.js +74 -0
- package/dist/modules/billing/billing-response.js.map +1 -0
- package/dist/modules/billing/billing.amounts.d.ts +19 -0
- package/dist/modules/billing/billing.amounts.js +72 -0
- package/dist/modules/billing/billing.amounts.js.map +1 -0
- package/dist/modules/billing/billing.associated-period.d.ts +8 -0
- package/dist/modules/billing/billing.associated-period.js +40 -0
- package/dist/modules/billing/billing.associated-period.js.map +1 -0
- package/dist/modules/billing/billing.associated-vouchers.d.ts +12 -0
- package/dist/modules/billing/billing.associated-vouchers.js +73 -0
- package/dist/modules/billing/billing.associated-vouchers.js.map +1 -0
- package/dist/modules/billing/billing.constants.d.ts +2 -0
- package/dist/modules/billing/billing.constants.js +3 -0
- package/dist/modules/billing/billing.constants.js.map +1 -0
- package/dist/modules/billing/billing.currency.d.ts +18 -0
- package/dist/modules/billing/billing.currency.js +53 -0
- package/dist/modules/billing/billing.currency.js.map +1 -0
- package/dist/modules/billing/billing.date-range.d.ts +9 -0
- package/dist/modules/billing/billing.date-range.js +52 -0
- package/dist/modules/billing/billing.date-range.js.map +1 -0
- package/dist/modules/billing/billing.display.d.ts +13 -0
- package/dist/modules/billing/billing.display.js +137 -0
- package/dist/modules/billing/billing.display.js.map +1 -0
- package/dist/modules/billing/billing.fce.d.ts +21 -0
- package/dist/modules/billing/billing.fce.js +59 -0
- package/dist/modules/billing/billing.fce.js.map +1 -0
- package/dist/modules/billing/billing.iva-receptor.d.ts +7 -0
- package/dist/modules/billing/billing.iva-receptor.js +58 -0
- package/dist/modules/billing/billing.iva-receptor.js.map +1 -0
- package/dist/modules/billing/billing.json-format.d.ts +6 -0
- package/dist/modules/billing/billing.json-format.js +5 -0
- package/dist/modules/billing/billing.json-format.js.map +1 -0
- package/dist/modules/billing/billing.labels.d.ts +9 -0
- package/dist/modules/billing/billing.labels.js +108 -0
- package/dist/modules/billing/billing.labels.js.map +1 -0
- package/dist/modules/billing/billing.mappers.d.ts +8 -0
- package/dist/modules/billing/billing.mappers.js +60 -0
- package/dist/modules/billing/billing.mappers.js.map +1 -0
- package/dist/modules/billing/billing.presenter.d.ts +7 -0
- package/dist/modules/billing/billing.presenter.js +3 -0
- package/dist/modules/billing/billing.presenter.js.map +1 -0
- package/dist/modules/billing/billing.schemas.d.ts +107 -0
- package/dist/modules/billing/billing.schemas.js +106 -0
- package/dist/modules/billing/billing.schemas.js.map +1 -0
- package/dist/modules/billing/billing.serialize.d.ts +8 -0
- package/dist/modules/billing/billing.serialize.js +53 -0
- package/dist/modules/billing/billing.serialize.js.map +1 -0
- package/dist/modules/billing/billing.service.d.ts +27 -0
- package/dist/modules/billing/billing.service.js +146 -0
- package/dist/modules/billing/billing.service.js.map +1 -0
- package/dist/modules/billing/billing.text.d.ts +8 -0
- package/dist/modules/billing/billing.text.js +52 -0
- package/dist/modules/billing/billing.text.js.map +1 -0
- package/dist/modules/billing/billing.types.d.ts +13 -0
- package/dist/modules/billing/billing.types.internal.d.ts +27 -0
- package/dist/modules/billing/billing.types.internal.js +2 -0
- package/dist/modules/billing/billing.types.internal.js.map +1 -0
- package/dist/modules/billing/billing.types.js +2 -0
- package/dist/modules/billing/billing.types.js.map +1 -0
- package/dist/modules/billing/billing.validation.d.ts +7 -0
- package/dist/modules/billing/billing.validation.js +80 -0
- package/dist/modules/billing/billing.validation.js.map +1 -0
- package/dist/modules/billing/voucher-kind-map.d.ts +9 -0
- package/dist/modules/billing/voucher-kind-map.js +180 -0
- package/dist/modules/billing/voucher-kind-map.js.map +1 -0
- package/dist/modules/config/config-doctor.d.ts +15 -0
- package/dist/modules/config/config-doctor.js +125 -0
- package/dist/modules/config/config-doctor.js.map +1 -0
- package/dist/modules/config/config-value-parser.d.ts +2 -0
- package/dist/modules/config/config-value-parser.js +99 -0
- package/dist/modules/config/config-value-parser.js.map +1 -0
- package/dist/modules/config/config.presenter.d.ts +7 -0
- package/dist/modules/config/config.presenter.js +88 -0
- package/dist/modules/config/config.presenter.js.map +1 -0
- package/dist/modules/config/config.schemas.d.ts +110 -0
- package/dist/modules/config/config.schemas.js +103 -0
- package/dist/modules/config/config.schemas.js.map +1 -0
- package/dist/modules/config/config.service.d.ts +20 -0
- package/dist/modules/config/config.service.js +82 -0
- package/dist/modules/config/config.service.js.map +1 -0
- package/dist/modules/examples/examples.d.ts +1 -0
- package/dist/modules/examples/examples.js +191 -0
- package/dist/modules/examples/examples.js.map +1 -0
- package/dist/modules/fce/fce-obligation.d.ts +20 -0
- package/dist/modules/fce/fce-obligation.js +33 -0
- package/dist/modules/fce/fce-obligation.js.map +1 -0
- package/dist/modules/fce/fce-obligation.presenter.d.ts +9 -0
- package/dist/modules/fce/fce-obligation.presenter.js +32 -0
- package/dist/modules/fce/fce-obligation.presenter.js.map +1 -0
- package/dist/modules/storybook/showcase-theme.d.ts +7 -0
- package/dist/modules/storybook/showcase-theme.js +6 -0
- package/dist/modules/storybook/showcase-theme.js.map +1 -0
- package/dist/modules/storybook/showcase.d.ts +2 -0
- package/dist/modules/storybook/showcase.js +310 -0
- package/dist/modules/storybook/showcase.js.map +1 -0
- package/dist/modules/update-check/update-check.presenter.d.ts +2 -0
- package/dist/modules/update-check/update-check.presenter.js +6 -0
- package/dist/modules/update-check/update-check.presenter.js.map +1 -0
- package/dist/modules/update-check/update-check.service.d.ts +8 -0
- package/dist/modules/update-check/update-check.service.js +72 -0
- package/dist/modules/update-check/update-check.service.js.map +1 -0
- package/dist/services/arca/arca-billing.gateway.d.ts +10 -0
- package/dist/services/arca/arca-billing.gateway.js +22 -0
- package/dist/services/arca/arca-billing.gateway.js.map +1 -0
- package/dist/services/arca/arca-client.factory.d.ts +5 -0
- package/dist/services/arca/arca-client.factory.js +7 -0
- package/dist/services/arca/arca-client.factory.js.map +1 -0
- package/dist/services/arca/arca-context.resolver.d.ts +44 -0
- package/dist/services/arca/arca-context.resolver.js +120 -0
- package/dist/services/arca/arca-context.resolver.js.map +1 -0
- package/dist/services/arca/arca-fce-obligation.gateway.d.ts +7 -0
- package/dist/services/arca/arca-fce-obligation.gateway.js +36 -0
- package/dist/services/arca/arca-fce-obligation.gateway.js.map +1 -0
- package/dist/ui/components/contentPanel.d.ts +5 -0
- package/dist/ui/components/contentPanel.js +11 -0
- package/dist/ui/components/contentPanel.js.map +1 -0
- package/dist/ui/components/errorPanel.d.ts +1 -0
- package/dist/ui/components/errorPanel.js +13 -0
- package/dist/ui/components/errorPanel.js.map +1 -0
- package/dist/ui/components/index.d.ts +6 -0
- package/dist/ui/components/index.js +7 -0
- package/dist/ui/components/index.js.map +1 -0
- package/dist/ui/components/keyValuePanel.d.ts +3 -0
- package/dist/ui/components/keyValuePanel.js +14 -0
- package/dist/ui/components/keyValuePanel.js.map +1 -0
- package/dist/ui/components/noticePanel.d.ts +3 -0
- package/dist/ui/components/noticePanel.js +11 -0
- package/dist/ui/components/noticePanel.js.map +1 -0
- package/dist/ui/components/rawPanel.d.ts +1 -0
- package/dist/ui/components/rawPanel.js +5 -0
- package/dist/ui/components/rawPanel.js.map +1 -0
- package/dist/ui/components/statusPanel.d.ts +3 -0
- package/dist/ui/components/statusPanel.js +20 -0
- package/dist/ui/components/statusPanel.js.map +1 -0
- package/dist/ui/index.d.ts +5 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/presenters/billing.presenter.d.ts +2 -0
- package/dist/ui/presenters/billing.presenter.js +2 -0
- package/dist/ui/presenters/billing.presenter.js.map +1 -0
- package/dist/ui/presenters/config.presenter.d.ts +1 -0
- package/dist/ui/presenters/config.presenter.js +2 -0
- package/dist/ui/presenters/config.presenter.js.map +1 -0
- package/dist/ui/presenters/errors.presenter.d.ts +1 -0
- package/dist/ui/presenters/errors.presenter.js +89 -0
- package/dist/ui/presenters/errors.presenter.js.map +1 -0
- package/dist/ui/presenters/errors.zod-presenter.d.ts +2 -0
- package/dist/ui/presenters/errors.zod-presenter.js +103 -0
- package/dist/ui/presenters/errors.zod-presenter.js.map +1 -0
- package/dist/ui/presenters/index.d.ts +4 -0
- package/dist/ui/presenters/index.js +5 -0
- package/dist/ui/presenters/index.js.map +1 -0
- package/dist/ui/presenters/showcase.presenter.d.ts +1 -0
- package/dist/ui/presenters/showcase.presenter.js +2 -0
- package/dist/ui/presenters/showcase.presenter.js.map +1 -0
- package/dist/ui/primitives/index.d.ts +10 -0
- package/dist/ui/primitives/index.js +11 -0
- package/dist/ui/primitives/index.js.map +1 -0
- package/dist/ui/primitives/renderDivider.d.ts +5 -0
- package/dist/ui/primitives/renderDivider.js +5 -0
- package/dist/ui/primitives/renderDivider.js.map +1 -0
- package/dist/ui/primitives/renderFooter.d.ts +7 -0
- package/dist/ui/primitives/renderFooter.js +6 -0
- package/dist/ui/primitives/renderFooter.js.map +1 -0
- package/dist/ui/primitives/renderJson.d.ts +3 -0
- package/dist/ui/primitives/renderJson.js +19 -0
- package/dist/ui/primitives/renderJson.js.map +1 -0
- package/dist/ui/primitives/renderKeyValue.d.ts +14 -0
- package/dist/ui/primitives/renderKeyValue.js +34 -0
- package/dist/ui/primitives/renderKeyValue.js.map +1 -0
- package/dist/ui/primitives/renderLogo.d.ts +2 -0
- package/dist/ui/primitives/renderLogo.js +28 -0
- package/dist/ui/primitives/renderLogo.js.map +1 -0
- package/dist/ui/primitives/renderObject.d.ts +1 -0
- package/dist/ui/primitives/renderObject.js +19 -0
- package/dist/ui/primitives/renderObject.js.map +1 -0
- package/dist/ui/primitives/renderPanel.d.ts +23 -0
- package/dist/ui/primitives/renderPanel.js +114 -0
- package/dist/ui/primitives/renderPanel.js.map +1 -0
- package/dist/ui/primitives/renderSubtitle.d.ts +7 -0
- package/dist/ui/primitives/renderSubtitle.js +6 -0
- package/dist/ui/primitives/renderSubtitle.js.map +1 -0
- package/dist/ui/primitives/renderTable.d.ts +6 -0
- package/dist/ui/primitives/renderTable.js +14 -0
- package/dist/ui/primitives/renderTable.js.map +1 -0
- package/dist/ui/primitives/text.d.ts +18 -0
- package/dist/ui/primitives/text.js +154 -0
- package/dist/ui/primitives/text.js.map +1 -0
- package/dist/ui/stream/index.d.ts +1 -0
- package/dist/ui/stream/index.js +2 -0
- package/dist/ui/stream/index.js.map +1 -0
- package/dist/ui/stream/terminal-stream.d.ts +10 -0
- package/dist/ui/stream/terminal-stream.js +20 -0
- package/dist/ui/stream/terminal-stream.js.map +1 -0
- package/dist/ui/theme/index.d.ts +1 -0
- package/dist/ui/theme/index.js +2 -0
- package/dist/ui/theme/index.js.map +1 -0
- package/dist/ui/theme/theme.d.ts +27 -0
- package/dist/ui/theme/theme.js +41 -0
- package/dist/ui/theme/theme.js.map +1 -0
- package/llms.txt +161 -0
- package/package.json +99 -35
- package/.babelrc +0 -4
- package/.eslintignore +0 -1
- package/.eslintrc.js +0 -17
- package/.npmignore +0 -1
- package/lib/arcli.js +0 -275
- package/lib/arcli.min.js +0 -1
- package/src/config.js +0 -22
- package/src/consoler.js +0 -10
- package/src/index.js +0 -21
- package/src/init.js +0 -13
- package/src/run.js +0 -4
- package/src/spinner.js +0 -39
- package/tst/index.js +0 -26
- 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
package/src/run.js
DELETED
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;
|