anl 1.1.2 → 1.1.4
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/lib/_virtual/_cloneBuffer.js +1 -7
- package/lib/_virtual/_commonjsHelpers.js +1 -7
- package/lib/_virtual/_nodeUtil.js +1 -7
- package/lib/_virtual/argument.js +1 -7
- package/lib/_virtual/command.js +1 -7
- package/lib/_virtual/eastasianwidth.js +1 -7
- package/lib/_virtual/error.js +1 -7
- package/lib/_virtual/help.js +1 -7
- package/lib/_virtual/index.js +1 -7
- package/lib/_virtual/index2.js +1 -7
- package/lib/_virtual/index3.js +1 -7
- package/lib/_virtual/isBuffer.js +1 -7
- package/lib/_virtual/lodash.js +1 -7
- package/lib/_virtual/option.js +1 -7
- package/lib/_virtual/signals.js +1 -7
- package/lib/_virtual/suggestSimilar.js +1 -7
- package/lib/node_modules/ansi-escapes/index.js +1 -166
- package/lib/node_modules/ansi-styles/index.js +1 -229
- package/lib/node_modules/cli-cursor/index.js +1 -47
- package/lib/node_modules/cli-width/index.js +1 -59
- package/lib/node_modules/commander/esm.mjs.js +1 -32
- package/lib/node_modules/commander/index.js +1 -49
- package/lib/node_modules/commander/lib/argument.js +1 -157
- package/lib/node_modules/commander/lib/command.js +1 -2208
- package/lib/node_modules/commander/lib/error.js +1 -53
- package/lib/node_modules/commander/lib/help.js +1 -474
- package/lib/node_modules/commander/lib/option.js +1 -336
- package/lib/node_modules/commander/lib/suggestSimilar.js +1 -108
- package/lib/node_modules/eastasianwidth/eastasianwidth.js +1 -321
- package/lib/node_modules/figures/index.js +1 -304
- package/lib/node_modules/inquirer/lib/inquirer.js +1 -109
- package/lib/node_modules/inquirer/lib/objects/choice.js +1 -41
- package/lib/node_modules/inquirer/lib/objects/choices.js +1 -125
- package/lib/node_modules/inquirer/lib/objects/separator.js +1 -43
- package/lib/node_modules/inquirer/lib/prompts/base.js +1 -194
- package/lib/node_modules/inquirer/lib/prompts/checkbox.js +1 -283
- package/lib/node_modules/inquirer/lib/prompts/confirm.js +1 -106
- package/lib/node_modules/inquirer/lib/prompts/editor.js +1 -113
- package/lib/node_modules/inquirer/lib/prompts/expand.js +1 -281
- package/lib/node_modules/inquirer/lib/prompts/input.js +1 -118
- package/lib/node_modules/inquirer/lib/prompts/list.js +1 -218
- package/lib/node_modules/inquirer/lib/prompts/number.js +1 -32
- package/lib/node_modules/inquirer/lib/prompts/password.js +1 -135
- package/lib/node_modules/inquirer/lib/prompts/rawlist.js +1 -236
- package/lib/node_modules/inquirer/lib/ui/baseUI.js +1 -99
- package/lib/node_modules/inquirer/lib/ui/bottom-bar.js +1 -103
- package/lib/node_modules/inquirer/lib/ui/prompt.js +1 -158
- package/lib/node_modules/inquirer/lib/utils/events.js +1 -62
- package/lib/node_modules/inquirer/lib/utils/incrementListIndex.js +1 -23
- package/lib/node_modules/inquirer/lib/utils/paginator.js +1 -87
- package/lib/node_modules/inquirer/lib/utils/readline.js +1 -60
- package/lib/node_modules/inquirer/lib/utils/screen-manager.js +1 -183
- package/lib/node_modules/inquirer/lib/utils/utils.js +1 -31
- package/lib/node_modules/inquirer/node_modules/ansi-regex/index.js +1 -14
- package/lib/node_modules/inquirer/node_modules/strip-ansi/index.js +1 -15
- package/lib/node_modules/is-unicode-supported/index.js +1 -27
- package/lib/node_modules/lodash/_DataView.js +1 -16
- package/lib/node_modules/lodash/_Hash.js +1 -44
- package/lib/node_modules/lodash/_ListCache.js +1 -44
- package/lib/node_modules/lodash/_Map.js +1 -16
- package/lib/node_modules/lodash/_MapCache.js +1 -44
- package/lib/node_modules/lodash/_Promise.js +1 -16
- package/lib/node_modules/lodash/_Set.js +1 -16
- package/lib/node_modules/lodash/_Stack.js +1 -40
- package/lib/node_modules/lodash/_Symbol.js +1 -14
- package/lib/node_modules/lodash/_Uint8Array.js +1 -14
- package/lib/node_modules/lodash/_WeakMap.js +1 -16
- package/lib/node_modules/lodash/_apply.js +1 -28
- package/lib/node_modules/lodash/_arrayEach.js +1 -29
- package/lib/node_modules/lodash/_arrayFilter.js +1 -32
- package/lib/node_modules/lodash/_arrayLikeKeys.js +1 -63
- package/lib/node_modules/lodash/_arrayMap.js +1 -28
- package/lib/node_modules/lodash/_arrayPush.js +1 -27
- package/lib/node_modules/lodash/_assignValue.js +1 -37
- package/lib/node_modules/lodash/_assocIndexOf.js +1 -29
- package/lib/node_modules/lodash/_baseAssign.js +1 -26
- package/lib/node_modules/lodash/_baseAssignIn.js +1 -26
- package/lib/node_modules/lodash/_baseAssignValue.js +1 -33
- package/lib/node_modules/lodash/_baseClone.js +1 -197
- package/lib/node_modules/lodash/_baseCreate.js +1 -38
- package/lib/node_modules/lodash/_baseGet.js +1 -33
- package/lib/node_modules/lodash/_baseGetAllKeys.js +1 -29
- package/lib/node_modules/lodash/_baseGetTag.js +1 -38
- package/lib/node_modules/lodash/_baseIsArguments.js +1 -27
- package/lib/node_modules/lodash/_baseIsMap.js +1 -27
- package/lib/node_modules/lodash/_baseIsNative.js +1 -58
- package/lib/node_modules/lodash/_baseIsSet.js +1 -27
- package/lib/node_modules/lodash/_baseIsTypedArray.js +1 -70
- package/lib/node_modules/lodash/_baseKeys.js +1 -39
- package/lib/node_modules/lodash/_baseKeysIn.js +1 -43
- package/lib/node_modules/lodash/_baseRest.js +1 -27
- package/lib/node_modules/lodash/_baseSet.js +1 -63
- package/lib/node_modules/lodash/_baseSetToString.js +1 -32
- package/lib/node_modules/lodash/_baseTimes.js +1 -27
- package/lib/node_modules/lodash/_baseToString.js +1 -48
- package/lib/node_modules/lodash/_baseUnary.js +1 -21
- package/lib/node_modules/lodash/_castPath.js +1 -32
- package/lib/node_modules/lodash/_cloneArrayBuffer.js +1 -24
- package/lib/node_modules/lodash/_cloneBuffer.js +1 -42
- package/lib/node_modules/lodash/_cloneDataView.js +1 -24
- package/lib/node_modules/lodash/_cloneRegExp.js +1 -24
- package/lib/node_modules/lodash/_cloneSymbol.js +1 -26
- package/lib/node_modules/lodash/_cloneTypedArray.js +1 -24
- package/lib/node_modules/lodash/_copyArray.js +1 -27
- package/lib/node_modules/lodash/_copyObject.js +1 -49
- package/lib/node_modules/lodash/_copySymbols.js +1 -25
- package/lib/node_modules/lodash/_copySymbolsIn.js +1 -25
- package/lib/node_modules/lodash/_coreJsData.js +1 -14
- package/lib/node_modules/lodash/_defineProperty.js +1 -19
- package/lib/node_modules/lodash/_freeGlobal.js +1 -13
- package/lib/node_modules/lodash/_getAllKeys.js +1 -26
- package/lib/node_modules/lodash/_getAllKeysIn.js +1 -27
- package/lib/node_modules/lodash/_getMapData.js +1 -26
- package/lib/node_modules/lodash/_getNative.js +1 -26
- package/lib/node_modules/lodash/_getPrototype.js +1 -14
- package/lib/node_modules/lodash/_getRawTag.js +1 -54
- package/lib/node_modules/lodash/_getSymbols.js +1 -39
- package/lib/node_modules/lodash/_getSymbolsIn.js +1 -36
- package/lib/node_modules/lodash/_getTag.js +1 -72
- package/lib/node_modules/lodash/_getValue.js +1 -20
- package/lib/node_modules/lodash/_hashClear.js +1 -23
- package/lib/node_modules/lodash/_hashDelete.js +1 -24
- package/lib/node_modules/lodash/_hashGet.js +1 -38
- package/lib/node_modules/lodash/_hashHas.js +1 -31
- package/lib/node_modules/lodash/_hashSet.js +1 -31
- package/lib/node_modules/lodash/_initCloneArray.js +1 -33
- package/lib/node_modules/lodash/_initCloneByTag.js +1 -89
- package/lib/node_modules/lodash/_initCloneObject.js +1 -28
- package/lib/node_modules/lodash/_isIndex.js +1 -32
- package/lib/node_modules/lodash/_isIterateeCall.js +1 -41
- package/lib/node_modules/lodash/_isKey.js +1 -38
- package/lib/node_modules/lodash/_isKeyable.js +1 -22
- package/lib/node_modules/lodash/_isMasked.js +1 -28
- package/lib/node_modules/lodash/_isPrototype.js +1 -25
- package/lib/node_modules/lodash/_listCacheClear.js +1 -20
- package/lib/node_modules/lodash/_listCacheDelete.js +1 -43
- package/lib/node_modules/lodash/_listCacheGet.js +1 -27
- package/lib/node_modules/lodash/_listCacheHas.js +1 -24
- package/lib/node_modules/lodash/_listCacheSet.js +1 -34
- package/lib/node_modules/lodash/_mapCacheClear.js +1 -31
- package/lib/node_modules/lodash/_mapCacheDelete.js +1 -26
- package/lib/node_modules/lodash/_mapCacheGet.js +1 -24
- package/lib/node_modules/lodash/_mapCacheHas.js +1 -24
- package/lib/node_modules/lodash/_mapCacheSet.js +1 -30
- package/lib/node_modules/lodash/_memoizeCapped.js +1 -34
- package/lib/node_modules/lodash/_nativeCreate.js +1 -14
- package/lib/node_modules/lodash/_nativeKeys.js +1 -14
- package/lib/node_modules/lodash/_nativeKeysIn.js +1 -27
- package/lib/node_modules/lodash/_nodeUtil.js +1 -37
- package/lib/node_modules/lodash/_objectToString.js +1 -29
- package/lib/node_modules/lodash/_overArg.js +1 -22
- package/lib/node_modules/lodash/_overRest.js +1 -44
- package/lib/node_modules/lodash/_root.js +1 -17
- package/lib/node_modules/lodash/_setToString.js +1 -23
- package/lib/node_modules/lodash/_shortOut.js +1 -44
- package/lib/node_modules/lodash/_stackClear.js +1 -23
- package/lib/node_modules/lodash/_stackDelete.js +1 -25
- package/lib/node_modules/lodash/_stackGet.js +1 -21
- package/lib/node_modules/lodash/_stackHas.js +1 -21
- package/lib/node_modules/lodash/_stackSet.js +1 -44
- package/lib/node_modules/lodash/_stringToPath.js +1 -35
- package/lib/node_modules/lodash/_toKey.js +1 -29
- package/lib/node_modules/lodash/_toSource.js +1 -33
- package/lib/node_modules/lodash/clone.js +1 -44
- package/lib/node_modules/lodash/constant.js +1 -33
- package/lib/node_modules/lodash/defaults.js +1 -75
- package/lib/node_modules/lodash/eq.js +1 -44
- package/lib/node_modules/lodash/get.js +1 -41
- package/lib/node_modules/lodash/identity.js +1 -28
- package/lib/node_modules/lodash/isArguments.js +1 -45
- package/lib/node_modules/lodash/isArray.js +1 -33
- package/lib/node_modules/lodash/isArrayLike.js +1 -42
- package/lib/node_modules/lodash/isBuffer.js +1 -46
- package/lib/node_modules/lodash/isFunction.js +1 -46
- package/lib/node_modules/lodash/isLength.js +1 -42
- package/lib/node_modules/lodash/isMap.js +1 -38
- package/lib/node_modules/lodash/isObject.js +1 -38
- package/lib/node_modules/lodash/isObjectLike.js +1 -36
- package/lib/node_modules/lodash/isPlainObject.js +1 -72
- package/lib/node_modules/lodash/isSet.js +1 -38
- package/lib/node_modules/lodash/isSymbol.js +1 -38
- package/lib/node_modules/lodash/isTypedArray.js +1 -38
- package/lib/node_modules/lodash/keys.js +1 -47
- package/lib/node_modules/lodash/keysIn.js +1 -42
- package/lib/node_modules/lodash/lodash.js +2 -17201
- package/lib/node_modules/lodash/memoize.js +1 -81
- package/lib/node_modules/lodash/set.js +1 -43
- package/lib/node_modules/lodash/stubArray.js +1 -30
- package/lib/node_modules/lodash/stubFalse.js +1 -25
- package/lib/node_modules/lodash/toString.js +1 -36
- package/lib/node_modules/mute-stream/mute.js +1 -157
- package/lib/node_modules/restore-cursor/index.js +1 -20
- package/lib/node_modules/run-async/index.js +1 -106
- package/lib/node_modules/rxjs/dist/esm5/internal/Observable.js +1 -107
- package/lib/node_modules/rxjs/dist/esm5/internal/Subject.js +1 -167
- package/lib/node_modules/rxjs/dist/esm5/internal/Subscriber.js +1 -174
- package/lib/node_modules/rxjs/dist/esm5/internal/Subscription.js +1 -150
- package/lib/node_modules/rxjs/dist/esm5/internal/config.js +1 -13
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/ConnectableObservable.js +1 -68
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/defer.js +1 -14
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/empty.js +1 -16
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/from.js +1 -12
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/fromEvent.js +1 -65
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/fromSubscribable.js +1 -11
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/innerFrom.js +1 -155
- package/lib/node_modules/rxjs/dist/esm5/internal/observable/of.js +1 -17
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +1 -67
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/concatMap.js +1 -12
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/connect.js +1 -23
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/filter.js +1 -15
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/flatMap.js +1 -9
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/map.js +1 -17
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/mergeInternals.js +1 -67
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/mergeMap.js +1 -22
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/multicast.js +1 -19
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/observeOn.js +1 -16
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/publish.js +1 -13
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/reduce.js +1 -12
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/refCount.js +1 -32
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/scanInternals.js +1 -28
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/share.js +1 -91
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/subscribeOn.js +1 -14
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/take.js +1 -26
- package/lib/node_modules/rxjs/dist/esm5/internal/operators/takeUntil.js +1 -17
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleArray.js +1 -24
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleAsyncIterable.js +1 -29
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleIterable.js +1 -38
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleObservable.js +1 -13
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/schedulePromise.js +1 -13
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduleReadableStreamLike.js +1 -12
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js +1 -43
- package/lib/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +1 -21
- package/lib/node_modules/rxjs/dist/esm5/internal/symbol/iterator.js +1 -14
- package/lib/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +1 -7
- package/lib/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js +1 -15
- package/lib/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -18
- package/lib/node_modules/rxjs/dist/esm5/internal/util/args.js +1 -14
- package/lib/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -12
- package/lib/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -16
- package/lib/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +1 -11
- package/lib/node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js +1 -23
- package/lib/node_modules/rxjs/dist/esm5/internal/util/identity.js +1 -9
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isArrayLike.js +1 -7
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isAsyncIterable.js +1 -11
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -9
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isInteropObservable.js +1 -12
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isIterable.js +1 -12
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isPromise.js +1 -11
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isReadableStreamLike.js +1 -45
- package/lib/node_modules/rxjs/dist/esm5/internal/util/isScheduler.js +1 -11
- package/lib/node_modules/rxjs/dist/esm5/internal/util/lift.js +1 -27
- package/lib/node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js +1 -16
- package/lib/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -7
- package/lib/node_modules/rxjs/dist/esm5/internal/util/pipe.js +1 -19
- package/lib/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -15
- package/lib/node_modules/rxjs/dist/esm5/internal/util/throwUnobservableError.js +1 -9
- package/lib/node_modules/signal-exit/index.js +1 -222
- package/lib/node_modules/signal-exit/signals.js +1 -59
- package/lib/node_modules/string-width/index.js +1 -64
- package/lib/node_modules/string-width/node_modules/ansi-regex/index.js +1 -14
- package/lib/node_modules/string-width/node_modules/strip-ansi/index.js +1 -15
- package/lib/node_modules/tslib/tslib.es6.js +1 -145
- package/lib/node_modules/wrap-ansi/index.js +1 -220
- package/lib/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +1 -14
- package/lib/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +1 -15
- package/lib/package.json.js +1 -95
- package/lib/src/const.js +1 -29
- package/lib/src/index.js +1 -12
- package/lib/src/install-commitlint.js +1 -64
- package/lib/src/install-eslint.js +1 -56
- package/lib/src/lint-init.js +1 -49
- package/lib/src/prettier.js +1 -51
- package/lib/src/utils.js +1 -38
- package/lib/src/vscode.js +1 -34
- package/package.json +2 -1
- /package/template/{.prettierrc.js → prettierrc.js} +0 -0
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};exports.commonjsGlobal=e;
|
package/lib/_virtual/argument.js
CHANGED
package/lib/_virtual/command.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var eastasianwidth = {exports: {}};
|
|
6
|
-
|
|
7
|
-
exports.eastasianwidth = eastasianwidth;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.eastasianwidth={exports:{}};
|
package/lib/_virtual/error.js
CHANGED
package/lib/_virtual/help.js
CHANGED
package/lib/_virtual/index.js
CHANGED
package/lib/_virtual/index2.js
CHANGED
package/lib/_virtual/index3.js
CHANGED
package/lib/_virtual/isBuffer.js
CHANGED
package/lib/_virtual/lodash.js
CHANGED
package/lib/_virtual/option.js
CHANGED
package/lib/_virtual/signals.js
CHANGED
|
@@ -1,166 +1 @@
|
|
|
1
|
-
|
|
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;
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("node:process"));const t="[",n="]",o="",i=";",s="Apple_Terminal"===r.default.env.TERM_PROGRAM,u={cursorTo:(e,r)=>{if("number"!=typeof e)throw new TypeError("The `x` argument is required");return"number"!=typeof r?t+(e+1)+"G":t+(r+1)+i+(e+1)+"H"},cursorMove:(e,r)=>{if("number"!=typeof e)throw new TypeError("The `x` argument is required");let n="";return e<0?n+=t+-e+"D":e>0&&(n+=t+e+"C"),r<0?n+=t+-r+"A":r>0&&(n+=t+r+"B"),n},cursorUp:(e=1)=>t+e+"A",cursorDown:(e=1)=>t+e+"B",cursorForward:(e=1)=>t+e+"C",cursorBackward:(e=1)=>t+e+"D",cursorLeft:"[G"};u.cursorSavePosition=s?"7":"[s",u.cursorRestorePosition=s?"8":"[u",u.cursorGetPosition="[6n",u.cursorNextLine="[E",u.cursorPrevLine="[F",u.cursorHide="[?25l",u.cursorShow="[?25h",u.eraseLines=e=>{let r="";for(let t=0;t<e;t++)r+=u.eraseLine+(t<e-1?u.cursorUp():"");return e&&(r+=u.cursorLeft),r},u.eraseEndLine="[K",u.eraseStartLine="[1K",u.eraseLine="[2K",u.eraseDown="[J",u.eraseUp="[1J",u.eraseScreen="[2J",u.scrollUp="[S",u.scrollDown="[T",u.clearScreen="c",u.clearTerminal="win32"===r.default.platform?`${u.eraseScreen}${t}0f`:`${u.eraseScreen}${t}3J${t}H`,u.beep=o,u.link=(e,r)=>[n,"8",i,i,r,o,e,n,"8",i,i,o].join(""),u.image=(e,r={})=>{let t=`${n}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),!1===r.preserveAspectRatio&&(t+=";preserveAspectRatio=0"),t+":"+e.toString("base64")+o},u.iTerm={setCwd:(e=r.default.cwd())=>`${n}50;CurrentDir=${e}${o}`,annotation(e,r={}){let t=`${n}1337;`;const i=void 0!==r.x,s=void 0!==r.y;if((i||s)&&(!i||!s||void 0===r.length))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(i?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+o}},exports.default=u;
|
|
@@ -1,229 +1 @@
|
|
|
1
|
-
|
|
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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e=10,r=(e=0)=>r=>`[${r+e}m`,o=(e=0)=>r=>`[${38+e};5;${r}m`,t=(e=0)=>(r,o,t)=>`[${38+e};2;${r};${o};${t}m`,n={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(n.modifier);const i=Object.keys(n.color),a=Object.keys(n.bgColor);const l=function(){const i=new Map;for(const[e,r]of Object.entries(n)){for(const[e,o]of Object.entries(r))n[e]={open:`[${o[0]}m`,close:`[${o[1]}m`},r[e]=n[e],i.set(o[0],o[1]);Object.defineProperty(n,e,{value:r,enumerable:!1})}return Object.defineProperty(n,"codes",{value:i,enumerable:!1}),n.color.close="[39m",n.bgColor.close="[49m",n.color.ansi=r(),n.color.ansi256=o(),n.color.ansi16m=t(),n.bgColor.ansi=r(e),n.bgColor.ansi256=o(e),n.bgColor.ansi16m=t(e),Object.defineProperties(n,{rgbToAnsi256:{value:(e,r,o)=>e===r&&r===o?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(o/255*5),enumerable:!1},hexToRgb:{value:e=>{const r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[o]=r;3===o.length&&(o=[...o].map((e=>e+e)).join(""));const t=Number.parseInt(o,16);return[t>>16&255,t>>8&255,255&t]},enumerable:!1},hexToAnsi256:{value:e=>n.rgbToAnsi256(...n.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return e-8+90;let r,o,t;if(e>=232)r=(10*(e-232)+8)/255,o=r,t=r;else{const n=(e-=16)%36;r=Math.floor(e/36)/5,o=Math.floor(n/6)/5,t=n%6/5}const n=2*Math.max(r,o,t);if(0===n)return 30;let i=30+(Math.round(t)<<2|Math.round(o)<<1|Math.round(r));return 2===n&&(i+=60),i},enumerable:!1},rgbToAnsi:{value:(e,r,o)=>n.ansi256ToAnsi(n.rgbToAnsi256(e,r,o)),enumerable:!1},hexToAnsi:{value:e=>n.ansi256ToAnsi(n.hexToAnsi256(e)),enumerable:!1}}),n}();exports.backgroundColorNames=a,exports.default=l,exports.foregroundColorNames=i;
|
|
@@ -1,47 +1 @@
|
|
|
1
|
-
|
|
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;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("node:process"),r=require("../restore-cursor/index.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=t(e);let o=!1;const d={show:(e=s.default.stderr)=>{e.isTTY&&(o=!1,e.write("[?25h"))},hide:(e=s.default.stderr)=>{e.isTTY&&(r.default(),o=!0,e.write("[?25l"))},toggle:(e,r)=>{void 0!==e&&(o=e),o?d.show(r):d.hide(r)}};exports.default=d;
|
|
@@ -1,59 +1 @@
|
|
|
1
|
-
|
|
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;
|
|
1
|
+
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("tty")),u=function(t){const u=function(t){const u={defaultWidth:0,output:process.stdout,tty:e.default};if(!t)return u;return Object.keys(u).forEach((function(e){t[e]||(t[e]=u[e])})),t}(t);if(u.output.getWindowSize)return u.output.getWindowSize()[0]||u.defaultWidth;if(u.tty.getWindowSize)return u.tty.getWindowSize()[1]||u.defaultWidth;if(u.output.columns)return u.output.columns;if(process.env.CLI_WIDTH){const t=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(t)&&0!==t)return t}return u.defaultWidth};exports.default=u;
|