HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/shop.komma.nl/node_modules/cli-ux/lib/action/pride-spinner.js
"use strict";
// tslint:disable restrict-plus-operands
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const chalk_1 = tslib_1.__importDefault(require("chalk"));
const supportsColor = tslib_1.__importStar(require("supports-color"));
const spinner_1 = tslib_1.__importDefault(require("./spinner"));
function color(s, frameIndex) {
    const prideColors = [
        chalk_1.default.keyword('pink'),
        chalk_1.default.red,
        chalk_1.default.keyword('orange'),
        chalk_1.default.yellow,
        chalk_1.default.green,
        chalk_1.default.cyan,
        chalk_1.default.blue,
        chalk_1.default.magenta,
    ];
    if (!supportsColor)
        return s;
    const has256 = supportsColor.stdout.has256 || (process.env.TERM || '').indexOf('256') !== -1;
    const prideColor = prideColors[frameIndex] || prideColors[0];
    return has256 ? prideColor(s) : chalk_1.default.magenta(s);
}
class PrideSpinnerAction extends spinner_1.default {
    _frame() {
        const frame = this.frames[this.frameIndex];
        this.frameIndex = ++this.frameIndex % this.frames.length;
        return color(frame, this.frameIndex);
    }
}
exports.default = PrideSpinnerAction;