anl 1.0.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/LICENSE +21 -0
- package/README.md +2 -0
- package/bin/an-cli.js +3 -0
- package/lib/_virtual/_cloneBuffer.js +7 -0
- package/lib/_virtual/_commonjsHelpers.js +7 -0
- package/lib/_virtual/_nodeUtil.js +7 -0
- package/lib/_virtual/argument.js +7 -0
- package/lib/_virtual/command.js +7 -0
- package/lib/_virtual/eastasianwidth.js +7 -0
- package/lib/_virtual/error.js +7 -0
- package/lib/_virtual/help.js +7 -0
- package/lib/_virtual/index.js +7 -0
- package/lib/_virtual/index2.js +7 -0
- package/lib/_virtual/index3.js +7 -0
- package/lib/_virtual/isBuffer.js +7 -0
- package/lib/_virtual/lodash.js +7 -0
- package/lib/_virtual/option.js +7 -0
- package/lib/_virtual/signals.js +7 -0
- package/lib/_virtual/suggestSimilar.js +7 -0
- package/lib/node_modules/ansi-escapes/index.js +166 -0
- package/lib/node_modules/ansi-styles/index.js +229 -0
- package/lib/node_modules/cli-cursor/index.js +47 -0
- package/lib/node_modules/cli-width/index.js +59 -0
- package/lib/node_modules/commander/esm.mjs.js +32 -0
- package/lib/node_modules/commander/index.js +49 -0
- package/lib/node_modules/commander/lib/argument.js +157 -0
- package/lib/node_modules/commander/lib/command.js +2208 -0
- package/lib/node_modules/commander/lib/error.js +53 -0
- package/lib/node_modules/commander/lib/help.js +474 -0
- package/lib/node_modules/commander/lib/option.js +336 -0
- package/lib/node_modules/commander/lib/suggestSimilar.js +108 -0
- package/lib/node_modules/eastasianwidth/eastasianwidth.js +321 -0
- package/lib/node_modules/figures/index.js +304 -0
- package/lib/node_modules/inquirer/lib/inquirer.js +109 -0
- package/lib/node_modules/inquirer/lib/objects/choice.js +41 -0
- package/lib/node_modules/inquirer/lib/objects/choices.js +125 -0
- package/lib/node_modules/inquirer/lib/objects/separator.js +43 -0
- package/lib/node_modules/inquirer/lib/prompts/base.js +194 -0
- package/lib/node_modules/inquirer/lib/prompts/checkbox.js +283 -0
- package/lib/node_modules/inquirer/lib/prompts/confirm.js +106 -0
- package/lib/node_modules/inquirer/lib/prompts/editor.js +113 -0
- package/lib/node_modules/inquirer/lib/prompts/expand.js +281 -0
- package/lib/node_modules/inquirer/lib/prompts/input.js +118 -0
- package/lib/node_modules/inquirer/lib/prompts/list.js +218 -0
- package/lib/node_modules/inquirer/lib/prompts/number.js +32 -0
- package/lib/node_modules/inquirer/lib/prompts/password.js +135 -0
- package/lib/node_modules/inquirer/lib/prompts/rawlist.js +236 -0
- package/lib/node_modules/inquirer/lib/ui/baseUI.js +99 -0
- package/lib/node_modules/inquirer/lib/ui/bottom-bar.js +103 -0
- package/lib/node_modules/inquirer/lib/ui/prompt.js +158 -0
- package/lib/node_modules/inquirer/lib/utils/events.js +62 -0
- package/lib/node_modules/inquirer/lib/utils/incrementListIndex.js +23 -0
- package/lib/node_modules/inquirer/lib/utils/paginator.js +87 -0
- package/lib/node_modules/inquirer/lib/utils/readline.js +60 -0
- package/lib/node_modules/inquirer/lib/utils/screen-manager.js +183 -0
- package/lib/node_modules/inquirer/lib/utils/utils.js +31 -0
- package/lib/node_modules/inquirer/node_modules/ansi-regex/index.js +14 -0
- package/lib/node_modules/inquirer/node_modules/strip-ansi/index.js +15 -0
- package/lib/node_modules/is-unicode-supported/index.js +27 -0
- package/lib/node_modules/lodash/_DataView.js +16 -0
- package/lib/node_modules/lodash/_Hash.js +44 -0
- package/lib/node_modules/lodash/_ListCache.js +44 -0
- package/lib/node_modules/lodash/_Map.js +16 -0
- package/lib/node_modules/lodash/_MapCache.js +44 -0
- package/lib/node_modules/lodash/_Promise.js +16 -0
- package/lib/node_modules/lodash/_Set.js +16 -0
- package/lib/node_modules/lodash/_Stack.js +40 -0
- package/lib/node_modules/lodash/_Symbol.js +14 -0
- package/lib/node_modules/lodash/_Uint8Array.js +14 -0
- package/lib/node_modules/lodash/_WeakMap.js +16 -0
- package/lib/node_modules/lodash/_apply.js +28 -0
- package/lib/node_modules/lodash/_arrayEach.js +29 -0
- package/lib/node_modules/lodash/_arrayFilter.js +32 -0
- package/lib/node_modules/lodash/_arrayLikeKeys.js +63 -0
- package/lib/node_modules/lodash/_arrayMap.js +28 -0
- package/lib/node_modules/lodash/_arrayPush.js +27 -0
- package/lib/node_modules/lodash/_assignValue.js +37 -0
- package/lib/node_modules/lodash/_assocIndexOf.js +29 -0
- package/lib/node_modules/lodash/_baseAssign.js +26 -0
- package/lib/node_modules/lodash/_baseAssignIn.js +26 -0
- package/lib/node_modules/lodash/_baseAssignValue.js +33 -0
- package/lib/node_modules/lodash/_baseClone.js +197 -0
- package/lib/node_modules/lodash/_baseCreate.js +38 -0
- package/lib/node_modules/lodash/_baseGet.js +33 -0
- package/lib/node_modules/lodash/_baseGetAllKeys.js +29 -0
- package/lib/node_modules/lodash/_baseGetTag.js +38 -0
- package/lib/node_modules/lodash/_baseIsArguments.js +27 -0
- package/lib/node_modules/lodash/_baseIsMap.js +27 -0
- package/lib/node_modules/lodash/_baseIsNative.js +58 -0
- package/lib/node_modules/lodash/_baseIsSet.js +27 -0
- package/lib/node_modules/lodash/_baseIsTypedArray.js +70 -0
- package/lib/node_modules/lodash/_baseKeys.js +39 -0
- package/lib/node_modules/lodash/_baseKeysIn.js +43 -0
- package/lib/node_modules/lodash/_baseRest.js +27 -0
- package/lib/node_modules/lodash/_baseSet.js +63 -0
- package/lib/node_modules/lodash/_baseSetToString.js +32 -0
- package/lib/node_modules/lodash/_baseTimes.js +27 -0
- package/lib/node_modules/lodash/_baseToString.js +48 -0
- package/lib/node_modules/lodash/_baseUnary.js +21 -0
- package/lib/node_modules/lodash/_castPath.js +32 -0
- package/lib/node_modules/lodash/_cloneArrayBuffer.js +24 -0
- package/lib/node_modules/lodash/_cloneBuffer.js +42 -0
- package/lib/node_modules/lodash/_cloneDataView.js +24 -0
- package/lib/node_modules/lodash/_cloneRegExp.js +24 -0
- package/lib/node_modules/lodash/_cloneSymbol.js +26 -0
- package/lib/node_modules/lodash/_cloneTypedArray.js +24 -0
- package/lib/node_modules/lodash/_copyArray.js +27 -0
- package/lib/node_modules/lodash/_copyObject.js +49 -0
- package/lib/node_modules/lodash/_copySymbols.js +25 -0
- package/lib/node_modules/lodash/_copySymbolsIn.js +25 -0
- package/lib/node_modules/lodash/_coreJsData.js +14 -0
- package/lib/node_modules/lodash/_defineProperty.js +19 -0
- package/lib/node_modules/lodash/_freeGlobal.js +13 -0
- package/lib/node_modules/lodash/_getAllKeys.js +26 -0
- package/lib/node_modules/lodash/_getAllKeysIn.js +27 -0
- package/lib/node_modules/lodash/_getMapData.js +26 -0
- package/lib/node_modules/lodash/_getNative.js +26 -0
- package/lib/node_modules/lodash/_getPrototype.js +14 -0
- package/lib/node_modules/lodash/_getRawTag.js +54 -0
- package/lib/node_modules/lodash/_getSymbols.js +39 -0
- package/lib/node_modules/lodash/_getSymbolsIn.js +36 -0
- package/lib/node_modules/lodash/_getTag.js +72 -0
- package/lib/node_modules/lodash/_getValue.js +20 -0
- package/lib/node_modules/lodash/_hashClear.js +23 -0
- package/lib/node_modules/lodash/_hashDelete.js +24 -0
- package/lib/node_modules/lodash/_hashGet.js +38 -0
- package/lib/node_modules/lodash/_hashHas.js +31 -0
- package/lib/node_modules/lodash/_hashSet.js +31 -0
- package/lib/node_modules/lodash/_initCloneArray.js +33 -0
- package/lib/node_modules/lodash/_initCloneByTag.js +89 -0
- package/lib/node_modules/lodash/_initCloneObject.js +28 -0
- package/lib/node_modules/lodash/_isIndex.js +32 -0
- package/lib/node_modules/lodash/_isIterateeCall.js +41 -0
- package/lib/node_modules/lodash/_isKey.js +38 -0
- package/lib/node_modules/lodash/_isKeyable.js +22 -0
- package/lib/node_modules/lodash/_isMasked.js +28 -0
- package/lib/node_modules/lodash/_isPrototype.js +25 -0
- package/lib/node_modules/lodash/_listCacheClear.js +20 -0
- package/lib/node_modules/lodash/_listCacheDelete.js +43 -0
- package/lib/node_modules/lodash/_listCacheGet.js +27 -0
- package/lib/node_modules/lodash/_listCacheHas.js +24 -0
- package/lib/node_modules/lodash/_listCacheSet.js +34 -0
- package/lib/node_modules/lodash/_mapCacheClear.js +31 -0
- package/lib/node_modules/lodash/_mapCacheDelete.js +26 -0
- package/lib/node_modules/lodash/_mapCacheGet.js +24 -0
- package/lib/node_modules/lodash/_mapCacheHas.js +24 -0
- package/lib/node_modules/lodash/_mapCacheSet.js +30 -0
- package/lib/node_modules/lodash/_memoizeCapped.js +34 -0
- package/lib/node_modules/lodash/_nativeCreate.js +14 -0
- package/lib/node_modules/lodash/_nativeKeys.js +14 -0
- package/lib/node_modules/lodash/_nativeKeysIn.js +27 -0
- package/lib/node_modules/lodash/_nodeUtil.js +37 -0
- package/lib/node_modules/lodash/_objectToString.js +29 -0
- package/lib/node_modules/lodash/_overArg.js +22 -0
- package/lib/node_modules/lodash/_overRest.js +44 -0
- package/lib/node_modules/lodash/_root.js +17 -0
- package/lib/node_modules/lodash/_setToString.js +23 -0
- package/lib/node_modules/lodash/_shortOut.js +44 -0
- package/lib/node_modules/lodash/_stackClear.js +23 -0
- package/lib/node_modules/lodash/_stackDelete.js +25 -0
- package/lib/node_modules/lodash/_stackGet.js +21 -0
- package/lib/node_modules/lodash/_stackHas.js +21 -0
- package/lib/node_modules/lodash/_stackSet.js +44 -0
- package/lib/node_modules/lodash/_stringToPath.js +35 -0
- package/lib/node_modules/lodash/_toKey.js +29 -0
- package/lib/node_modules/lodash/_toSource.js +33 -0
- package/lib/node_modules/lodash/clone.js +44 -0
- package/lib/node_modules/lodash/constant.js +33 -0
- package/lib/node_modules/lodash/defaults.js +75 -0
- package/lib/node_modules/lodash/eq.js +44 -0
- package/lib/node_modules/lodash/get.js +41 -0
- package/lib/node_modules/lodash/identity.js +28 -0
- package/lib/node_modules/lodash/isArguments.js +45 -0
- package/lib/node_modules/lodash/isArray.js +33 -0
- package/lib/node_modules/lodash/isArrayLike.js +42 -0
- package/lib/node_modules/lodash/isBuffer.js +46 -0
- package/lib/node_modules/lodash/isFunction.js +46 -0
- package/lib/node_modules/lodash/isLength.js +42 -0
- package/lib/node_modules/lodash/isMap.js +38 -0
- package/lib/node_modules/lodash/isObject.js +38 -0
- package/lib/node_modules/lodash/isObjectLike.js +36 -0
- package/lib/node_modules/lodash/isPlainObject.js +72 -0
- package/lib/node_modules/lodash/isSet.js +38 -0
- package/lib/node_modules/lodash/isSymbol.js +38 -0
- package/lib/node_modules/lodash/isTypedArray.js +38 -0
- package/lib/node_modules/lodash/keys.js +47 -0
- package/lib/node_modules/lodash/keysIn.js +42 -0
- package/lib/node_modules/lodash/lodash.js +17209 -0
- package/lib/node_modules/lodash/memoize.js +81 -0
- package/lib/node_modules/lodash/set.js +43 -0
- package/lib/node_modules/lodash/stubArray.js +30 -0
- package/lib/node_modules/lodash/stubFalse.js +25 -0
- package/lib/node_modules/lodash/toString.js +36 -0
- package/lib/node_modules/mute-stream/mute.js +157 -0
- package/lib/node_modules/restore-cursor/index.js +20 -0
- package/lib/node_modules/run-async/index.js +106 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/Observable.js +107 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/Subject.js +167 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/Subscriber.js +174 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/Subscription.js +150 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/config.js +13 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js +68 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/defer.js +14 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/empty.js +16 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/from.js +12 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js +65 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js +11 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js +155 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/of.js +17 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +67 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js +12 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/connect.js +23 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/filter.js +15 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js +9 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/map.js +17 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js +67 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js +22 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/multicast.js +19 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js +16 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/publish.js +13 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/reduce.js +12 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/refCount.js +32 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js +28 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/share.js +91 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js +14 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/take.js +26 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js +17 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js +24 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js +29 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js +38 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js +13 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js +13 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js +12 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js +43 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +21 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js +14 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +7 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js +15 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +18 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/args.js +14 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +12 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +16 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +11 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js +23 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/identity.js +9 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js +7 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js +11 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +9 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js +12 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isIterable.js +12 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isPromise.js +11 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js +45 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js +11 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/lift.js +27 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js +16 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/noop.js +7 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/pipe.js +19 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +15 -0
- package/lib/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js +9 -0
- package/lib/node_modules/signal-exit/index.js +222 -0
- package/lib/node_modules/signal-exit/signals.js +59 -0
- package/lib/node_modules/string-width/index.js +64 -0
- package/lib/node_modules/string-width/node_modules/ansi-regex/index.js +14 -0
- package/lib/node_modules/string-width/node_modules/strip-ansi/index.js +15 -0
- package/lib/node_modules/tslib/tslib.es6.js +145 -0
- package/lib/node_modules/wrap-ansi/index.js +220 -0
- package/lib/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +14 -0
- package/lib/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +15 -0
- package/lib/package.json.js +94 -0
- package/lib/src/index.js +12 -0
- package/lib/src/install-eslint.js +32 -0
- package/lib/src/lint-init.js +31 -0
- package/lib/src/utils.js +37 -0
- package/package.json +62 -0
- package/template/.eslintignore +3 -0
- package/template/.eslintrc.js +22 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Gleason
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/bin/an-cli.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
|
+
|
|
7
|
+
exports.commonjsGlobal = commonjsGlobal;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var process = require('node:process');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var process__default = /*#__PURE__*/_interopDefaultLegacy(process);
|
|
10
|
+
|
|
11
|
+
const ESC = '\u001B[';
|
|
12
|
+
const OSC = '\u001B]';
|
|
13
|
+
const BEL = '\u0007';
|
|
14
|
+
const SEP = ';';
|
|
15
|
+
|
|
16
|
+
const isTerminalApp = process__default["default"].env.TERM_PROGRAM === 'Apple_Terminal';
|
|
17
|
+
|
|
18
|
+
const ansiEscapes = {};
|
|
19
|
+
|
|
20
|
+
ansiEscapes.cursorTo = (x, y) => {
|
|
21
|
+
if (typeof x !== 'number') {
|
|
22
|
+
throw new TypeError('The `x` argument is required');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (typeof y !== 'number') {
|
|
26
|
+
return ESC + (x + 1) + 'G';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return ESC + (y + 1) + SEP + (x + 1) + 'H';
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
ansiEscapes.cursorMove = (x, y) => {
|
|
33
|
+
if (typeof x !== 'number') {
|
|
34
|
+
throw new TypeError('The `x` argument is required');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let returnValue = '';
|
|
38
|
+
|
|
39
|
+
if (x < 0) {
|
|
40
|
+
returnValue += ESC + (-x) + 'D';
|
|
41
|
+
} else if (x > 0) {
|
|
42
|
+
returnValue += ESC + x + 'C';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (y < 0) {
|
|
46
|
+
returnValue += ESC + (-y) + 'A';
|
|
47
|
+
} else if (y > 0) {
|
|
48
|
+
returnValue += ESC + y + 'B';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return returnValue;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
ansiEscapes.cursorUp = (count = 1) => ESC + count + 'A';
|
|
55
|
+
ansiEscapes.cursorDown = (count = 1) => ESC + count + 'B';
|
|
56
|
+
ansiEscapes.cursorForward = (count = 1) => ESC + count + 'C';
|
|
57
|
+
ansiEscapes.cursorBackward = (count = 1) => ESC + count + 'D';
|
|
58
|
+
|
|
59
|
+
ansiEscapes.cursorLeft = ESC + 'G';
|
|
60
|
+
ansiEscapes.cursorSavePosition = isTerminalApp ? '\u001B7' : ESC + 's';
|
|
61
|
+
ansiEscapes.cursorRestorePosition = isTerminalApp ? '\u001B8' : ESC + 'u';
|
|
62
|
+
ansiEscapes.cursorGetPosition = ESC + '6n';
|
|
63
|
+
ansiEscapes.cursorNextLine = ESC + 'E';
|
|
64
|
+
ansiEscapes.cursorPrevLine = ESC + 'F';
|
|
65
|
+
ansiEscapes.cursorHide = ESC + '?25l';
|
|
66
|
+
ansiEscapes.cursorShow = ESC + '?25h';
|
|
67
|
+
|
|
68
|
+
ansiEscapes.eraseLines = count => {
|
|
69
|
+
let clear = '';
|
|
70
|
+
|
|
71
|
+
for (let i = 0; i < count; i++) {
|
|
72
|
+
clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : '');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (count) {
|
|
76
|
+
clear += ansiEscapes.cursorLeft;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return clear;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
ansiEscapes.eraseEndLine = ESC + 'K';
|
|
83
|
+
ansiEscapes.eraseStartLine = ESC + '1K';
|
|
84
|
+
ansiEscapes.eraseLine = ESC + '2K';
|
|
85
|
+
ansiEscapes.eraseDown = ESC + 'J';
|
|
86
|
+
ansiEscapes.eraseUp = ESC + '1J';
|
|
87
|
+
ansiEscapes.eraseScreen = ESC + '2J';
|
|
88
|
+
ansiEscapes.scrollUp = ESC + 'S';
|
|
89
|
+
ansiEscapes.scrollDown = ESC + 'T';
|
|
90
|
+
|
|
91
|
+
ansiEscapes.clearScreen = '\u001Bc';
|
|
92
|
+
|
|
93
|
+
ansiEscapes.clearTerminal = process__default["default"].platform === 'win32'
|
|
94
|
+
? `${ansiEscapes.eraseScreen}${ESC}0f`
|
|
95
|
+
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
96
|
+
// 2. Erases the whole screen including scrollback buffer
|
|
97
|
+
// 3. Moves cursor to the top-left position
|
|
98
|
+
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
99
|
+
: `${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`;
|
|
100
|
+
|
|
101
|
+
ansiEscapes.beep = BEL;
|
|
102
|
+
|
|
103
|
+
ansiEscapes.link = (text, url) => [
|
|
104
|
+
OSC,
|
|
105
|
+
'8',
|
|
106
|
+
SEP,
|
|
107
|
+
SEP,
|
|
108
|
+
url,
|
|
109
|
+
BEL,
|
|
110
|
+
text,
|
|
111
|
+
OSC,
|
|
112
|
+
'8',
|
|
113
|
+
SEP,
|
|
114
|
+
SEP,
|
|
115
|
+
BEL,
|
|
116
|
+
].join('');
|
|
117
|
+
|
|
118
|
+
ansiEscapes.image = (buffer, options = {}) => {
|
|
119
|
+
let returnValue = `${OSC}1337;File=inline=1`;
|
|
120
|
+
|
|
121
|
+
if (options.width) {
|
|
122
|
+
returnValue += `;width=${options.width}`;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (options.height) {
|
|
126
|
+
returnValue += `;height=${options.height}`;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (options.preserveAspectRatio === false) {
|
|
130
|
+
returnValue += ';preserveAspectRatio=0';
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return returnValue + ':' + buffer.toString('base64') + BEL;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
ansiEscapes.iTerm = {
|
|
137
|
+
setCwd: (cwd = process__default["default"].cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
|
|
138
|
+
|
|
139
|
+
annotation(message, options = {}) {
|
|
140
|
+
let returnValue = `${OSC}1337;`;
|
|
141
|
+
|
|
142
|
+
const hasX = typeof options.x !== 'undefined';
|
|
143
|
+
const hasY = typeof options.y !== 'undefined';
|
|
144
|
+
if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== 'undefined')) {
|
|
145
|
+
throw new Error('`x`, `y` and `length` must be defined when `x` or `y` is defined');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
message = message.replace(/\|/g, '');
|
|
149
|
+
|
|
150
|
+
returnValue += options.isHidden ? 'AddHiddenAnnotation=' : 'AddAnnotation=';
|
|
151
|
+
|
|
152
|
+
if (options.length > 0) {
|
|
153
|
+
returnValue += (
|
|
154
|
+
hasX
|
|
155
|
+
? [message, options.length, options.x, options.y]
|
|
156
|
+
: [options.length, message]
|
|
157
|
+
).join('|');
|
|
158
|
+
} else {
|
|
159
|
+
returnValue += message;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return returnValue + BEL;
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
exports["default"] = ansiEscapes;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const ANSI_BACKGROUND_OFFSET = 10;
|
|
6
|
+
|
|
7
|
+
const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`;
|
|
8
|
+
|
|
9
|
+
const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`;
|
|
10
|
+
|
|
11
|
+
const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`;
|
|
12
|
+
|
|
13
|
+
const styles = {
|
|
14
|
+
modifier: {
|
|
15
|
+
reset: [0, 0],
|
|
16
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
17
|
+
bold: [1, 22],
|
|
18
|
+
dim: [2, 22],
|
|
19
|
+
italic: [3, 23],
|
|
20
|
+
underline: [4, 24],
|
|
21
|
+
overline: [53, 55],
|
|
22
|
+
inverse: [7, 27],
|
|
23
|
+
hidden: [8, 28],
|
|
24
|
+
strikethrough: [9, 29],
|
|
25
|
+
},
|
|
26
|
+
color: {
|
|
27
|
+
black: [30, 39],
|
|
28
|
+
red: [31, 39],
|
|
29
|
+
green: [32, 39],
|
|
30
|
+
yellow: [33, 39],
|
|
31
|
+
blue: [34, 39],
|
|
32
|
+
magenta: [35, 39],
|
|
33
|
+
cyan: [36, 39],
|
|
34
|
+
white: [37, 39],
|
|
35
|
+
|
|
36
|
+
// Bright color
|
|
37
|
+
blackBright: [90, 39],
|
|
38
|
+
gray: [90, 39], // Alias of `blackBright`
|
|
39
|
+
grey: [90, 39], // Alias of `blackBright`
|
|
40
|
+
redBright: [91, 39],
|
|
41
|
+
greenBright: [92, 39],
|
|
42
|
+
yellowBright: [93, 39],
|
|
43
|
+
blueBright: [94, 39],
|
|
44
|
+
magentaBright: [95, 39],
|
|
45
|
+
cyanBright: [96, 39],
|
|
46
|
+
whiteBright: [97, 39],
|
|
47
|
+
},
|
|
48
|
+
bgColor: {
|
|
49
|
+
bgBlack: [40, 49],
|
|
50
|
+
bgRed: [41, 49],
|
|
51
|
+
bgGreen: [42, 49],
|
|
52
|
+
bgYellow: [43, 49],
|
|
53
|
+
bgBlue: [44, 49],
|
|
54
|
+
bgMagenta: [45, 49],
|
|
55
|
+
bgCyan: [46, 49],
|
|
56
|
+
bgWhite: [47, 49],
|
|
57
|
+
|
|
58
|
+
// Bright color
|
|
59
|
+
bgBlackBright: [100, 49],
|
|
60
|
+
bgGray: [100, 49], // Alias of `bgBlackBright`
|
|
61
|
+
bgGrey: [100, 49], // Alias of `bgBlackBright`
|
|
62
|
+
bgRedBright: [101, 49],
|
|
63
|
+
bgGreenBright: [102, 49],
|
|
64
|
+
bgYellowBright: [103, 49],
|
|
65
|
+
bgBlueBright: [104, 49],
|
|
66
|
+
bgMagentaBright: [105, 49],
|
|
67
|
+
bgCyanBright: [106, 49],
|
|
68
|
+
bgWhiteBright: [107, 49],
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
Object.keys(styles.modifier);
|
|
73
|
+
const foregroundColorNames = Object.keys(styles.color);
|
|
74
|
+
const backgroundColorNames = Object.keys(styles.bgColor);
|
|
75
|
+
[...foregroundColorNames, ...backgroundColorNames];
|
|
76
|
+
|
|
77
|
+
function assembleStyles() {
|
|
78
|
+
const codes = new Map();
|
|
79
|
+
|
|
80
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
81
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
82
|
+
styles[styleName] = {
|
|
83
|
+
open: `\u001B[${style[0]}m`,
|
|
84
|
+
close: `\u001B[${style[1]}m`,
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
group[styleName] = styles[styleName];
|
|
88
|
+
|
|
89
|
+
codes.set(style[0], style[1]);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
Object.defineProperty(styles, groupName, {
|
|
93
|
+
value: group,
|
|
94
|
+
enumerable: false,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
Object.defineProperty(styles, 'codes', {
|
|
99
|
+
value: codes,
|
|
100
|
+
enumerable: false,
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
styles.color.close = '\u001B[39m';
|
|
104
|
+
styles.bgColor.close = '\u001B[49m';
|
|
105
|
+
|
|
106
|
+
styles.color.ansi = wrapAnsi16();
|
|
107
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
108
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
109
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
110
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
111
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
112
|
+
|
|
113
|
+
// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js
|
|
114
|
+
Object.defineProperties(styles, {
|
|
115
|
+
rgbToAnsi256: {
|
|
116
|
+
value: (red, green, blue) => {
|
|
117
|
+
// We use the extended greyscale palette here, with the exception of
|
|
118
|
+
// black and white. normal palette only has 4 greyscale shades.
|
|
119
|
+
if (red === green && green === blue) {
|
|
120
|
+
if (red < 8) {
|
|
121
|
+
return 16;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (red > 248) {
|
|
125
|
+
return 231;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return Math.round(((red - 8) / 247) * 24) + 232;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return 16
|
|
132
|
+
+ (36 * Math.round(red / 255 * 5))
|
|
133
|
+
+ (6 * Math.round(green / 255 * 5))
|
|
134
|
+
+ Math.round(blue / 255 * 5);
|
|
135
|
+
},
|
|
136
|
+
enumerable: false,
|
|
137
|
+
},
|
|
138
|
+
hexToRgb: {
|
|
139
|
+
value: hex => {
|
|
140
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
141
|
+
if (!matches) {
|
|
142
|
+
return [0, 0, 0];
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
let [colorString] = matches;
|
|
146
|
+
|
|
147
|
+
if (colorString.length === 3) {
|
|
148
|
+
colorString = [...colorString].map(character => character + character).join('');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const integer = Number.parseInt(colorString, 16);
|
|
152
|
+
|
|
153
|
+
return [
|
|
154
|
+
/* eslint-disable no-bitwise */
|
|
155
|
+
(integer >> 16) & 0xFF,
|
|
156
|
+
(integer >> 8) & 0xFF,
|
|
157
|
+
integer & 0xFF,
|
|
158
|
+
/* eslint-enable no-bitwise */
|
|
159
|
+
];
|
|
160
|
+
},
|
|
161
|
+
enumerable: false,
|
|
162
|
+
},
|
|
163
|
+
hexToAnsi256: {
|
|
164
|
+
value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
165
|
+
enumerable: false,
|
|
166
|
+
},
|
|
167
|
+
ansi256ToAnsi: {
|
|
168
|
+
value: code => {
|
|
169
|
+
if (code < 8) {
|
|
170
|
+
return 30 + code;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (code < 16) {
|
|
174
|
+
return 90 + (code - 8);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
let red;
|
|
178
|
+
let green;
|
|
179
|
+
let blue;
|
|
180
|
+
|
|
181
|
+
if (code >= 232) {
|
|
182
|
+
red = (((code - 232) * 10) + 8) / 255;
|
|
183
|
+
green = red;
|
|
184
|
+
blue = red;
|
|
185
|
+
} else {
|
|
186
|
+
code -= 16;
|
|
187
|
+
|
|
188
|
+
const remainder = code % 36;
|
|
189
|
+
|
|
190
|
+
red = Math.floor(code / 36) / 5;
|
|
191
|
+
green = Math.floor(remainder / 6) / 5;
|
|
192
|
+
blue = (remainder % 6) / 5;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const value = Math.max(red, green, blue) * 2;
|
|
196
|
+
|
|
197
|
+
if (value === 0) {
|
|
198
|
+
return 30;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// eslint-disable-next-line no-bitwise
|
|
202
|
+
let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));
|
|
203
|
+
|
|
204
|
+
if (value === 2) {
|
|
205
|
+
result += 60;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return result;
|
|
209
|
+
},
|
|
210
|
+
enumerable: false,
|
|
211
|
+
},
|
|
212
|
+
rgbToAnsi: {
|
|
213
|
+
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
214
|
+
enumerable: false,
|
|
215
|
+
},
|
|
216
|
+
hexToAnsi: {
|
|
217
|
+
value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
218
|
+
enumerable: false,
|
|
219
|
+
},
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
return styles;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const ansiStyles = assembleStyles();
|
|
226
|
+
|
|
227
|
+
exports.backgroundColorNames = backgroundColorNames;
|
|
228
|
+
exports["default"] = ansiStyles;
|
|
229
|
+
exports.foregroundColorNames = foregroundColorNames;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var process = require('node:process');
|
|
6
|
+
var index = require('../restore-cursor/index.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var process__default = /*#__PURE__*/_interopDefaultLegacy(process);
|
|
11
|
+
|
|
12
|
+
let isHidden = false;
|
|
13
|
+
|
|
14
|
+
const cliCursor = {};
|
|
15
|
+
|
|
16
|
+
cliCursor.show = (writableStream = process__default["default"].stderr) => {
|
|
17
|
+
if (!writableStream.isTTY) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
isHidden = false;
|
|
22
|
+
writableStream.write('\u001B[?25h');
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
cliCursor.hide = (writableStream = process__default["default"].stderr) => {
|
|
26
|
+
if (!writableStream.isTTY) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
index["default"]();
|
|
31
|
+
isHidden = true;
|
|
32
|
+
writableStream.write('\u001B[?25l');
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
cliCursor.toggle = (force, writableStream) => {
|
|
36
|
+
if (force !== undefined) {
|
|
37
|
+
isHidden = force;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (isHidden) {
|
|
41
|
+
cliCursor.show(writableStream);
|
|
42
|
+
} else {
|
|
43
|
+
cliCursor.hide(writableStream);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
exports["default"] = cliCursor;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var require$$0 = require('tty');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
10
|
+
|
|
11
|
+
var cliWidth_1 = cliWidth;
|
|
12
|
+
|
|
13
|
+
function normalizeOpts(options) {
|
|
14
|
+
const defaultOpts = {
|
|
15
|
+
defaultWidth: 0,
|
|
16
|
+
output: process.stdout,
|
|
17
|
+
tty: require$$0__default["default"],
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
if (!options) {
|
|
21
|
+
return defaultOpts;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Object.keys(defaultOpts).forEach(function (key) {
|
|
25
|
+
if (!options[key]) {
|
|
26
|
+
options[key] = defaultOpts[key];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return options;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function cliWidth(options) {
|
|
34
|
+
const opts = normalizeOpts(options);
|
|
35
|
+
|
|
36
|
+
if (opts.output.getWindowSize) {
|
|
37
|
+
return opts.output.getWindowSize()[0] || opts.defaultWidth;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (opts.tty.getWindowSize) {
|
|
41
|
+
return opts.tty.getWindowSize()[1] || opts.defaultWidth;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (opts.output.columns) {
|
|
45
|
+
return opts.output.columns;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (process.env.CLI_WIDTH) {
|
|
49
|
+
const width = parseInt(process.env.CLI_WIDTH, 10);
|
|
50
|
+
|
|
51
|
+
if (!isNaN(width) && width !== 0) {
|
|
52
|
+
return width;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return opts.defaultWidth;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
exports["default"] = cliWidth_1;
|