Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

acquerello

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acquerello - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

23

CHANGELOG.md

@@ -0,13 +1,24 @@

### 2021-01-02 / 0.1.3
- chore: Fixed workflow.
- chore: Updated code and tools.
### 2019-11-20 / 0.1.2
* chore: Minor configuration fix.
* chore: Switch to GitHub Actions.
* chore: Linting fixes.
- chore: Minor configuration fix.
- chore: Switch to GitHub Actions.
- chore: Linting fixes.
### 2019-10-08 / 0.1.1
* chore: Fixed readme.
- chore: Fixed readme.
### 2019-10-07 / 0.1.0
### 2019-10-08 / 0.1.0
- Initial version.
- chore: Fixed CodeCov configuration.
- chore: Fixed reporters.
- chore: Updated badges.
- chore: Update CI configuration.
- chore: Prepare CI.
- chore: Tested all the code.
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultStyles = exports.makeAnsiCode = exports.escapeCode = void 0;
function flatten(input) {

@@ -4,0 +5,0 @@ return input.reduce((accu, entry) => accu.concat(Array.isArray(entry) ? entry : [entry]), []);

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.clean = exports.colorize = exports.templateMatcher = void 0;
const codes_1 = require("./codes");
const spec_1 = require("./spec");
const styles_1 = require("./styles");
__export(require("./codes"));
__export(require("./spec"));
__export(require("./styles"));
__exportStar(require("./codes"), exports);
__exportStar(require("./spec"), exports);
__exportStar(require("./styles"), exports);
// eslint-disable-next-line no-useless-escape
exports.templateMatcher = /\{{2}([^\{\}]+?)\}{2}/gi;

@@ -19,2 +28,3 @@ function colorize(raw) {

let modified = raw.replace(exports.templateMatcher, (_, spec) => {
var _a;
const revert = [];

@@ -51,3 +61,3 @@ let replacement = '';

// Search in custom styles first
const styles = styles_1.customStyles.get(token) || [token];
const styles = (_a = styles_1.customStyles.get(token)) !== null && _a !== void 0 ? _a : [token];
for (const style of styles) {

@@ -54,0 +64,0 @@ // Add a style

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertColorSpec = exports.hexMatcher = exports.rgbMatcher = exports.ansiMatcher = exports.ansiBackground = exports.ansiForeground = void 0;
const codes_1 = require("./codes");

@@ -11,6 +12,5 @@ // Base styles for ANSI, RGB and HEX

function convertColorSpec(name) {
const lastMatch = (name.match(exports.ansiMatcher) ||
name.match(exports.rgbMatcher) ||
name.match(exports.hexMatcher) ||
[]).map((m) => (m ? m.toLowerCase() : m));
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
let lastMatch = name.match(exports.ansiMatcher) || name.match(exports.rgbMatcher) || name.match(exports.hexMatcher) || [];
lastMatch = lastMatch.map((m) => (m ? m.toLowerCase() : m));
const ansiBase = lastMatch[1] && lastMatch[1] === 'bg' ? exports.ansiBackground : exports.ansiForeground;

@@ -17,0 +17,0 @@ const base = lastMatch[2] === 'hex' ? 16 : 0;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.customStyles = exports.deleteCustomStyle = exports.addCustomStyle = exports.applyStyle = void 0;
const index_1 = require("./index");

@@ -9,2 +10,3 @@ function applyStyle(content, ...styles) {

function addCustomStyle(name, ...styles) {
// eslint-disable-next-line no-useless-escape
if (!name.match(/^[^\s\{\}]+$/)) {

@@ -11,0 +13,0 @@ throw new Error('The custom style name cannot contain spaces or curly braces');

{
"name": "acquerello",
"version": "0.1.2",
"version": "0.1.3",
"description": "Template based terminal coloring made really easy.",
"homepage": "https://sw.cowtech.it/acquerello",
"repository": "github:ShogunPanda/acquerello",
"keywords": [
"colors"
],
"bugs": {

@@ -11,3 +14,3 @@ "url": "https://github.com/ShogunPanda/acquerello/issues"

"author": "Shogun <shogun@cowtech.it>",
"license": "MIT",
"license": "ISC",
"private": false,

@@ -25,5 +28,6 @@ "files": [

"scripts": {
"lint": "tslint --project tsconfig.test.json -t stylish src/*.ts test/*.ts",
"test": "jest test --coverage --coverageReporters=html --coverageReporters=text",
"ci": "yarn lint && jest --coverage --coverageThreshold='{\"global\":{\"branches\":90,\"functions\":90,\"lines\":90,\"statements\":90}}' --ci --coverageReporters=json",
"lint": "eslint src/*.ts test/*.ts",
"test": "tap --reporter=spec --coverage-report=html --coverage-report=text --no-browser test/*.test.ts",
"test:ci": "tap --no-color --reporter=spec --coverage-report=json --coverage-report=text --branches 90 --functions 90 --lines 90 --statements 90 test/*.test.ts",
"ci": "yarn lint && yarn test:ci",
"prebuild": "rm -rf lib/* types/* && yarn lint",

@@ -35,16 +39,12 @@ "build": "tsc -p .",

"devDependencies": {
"@cowtech/tslint-config": "^5.13.0",
"@types/jest": "^24.0.18",
"@types/node": "^12.7.11",
"jest": "^24.9.0",
"prettier": "^1.18.2",
"ts-jest": "^24.1.0",
"tslint": "^5.20.0",
"typescript": "^3.6.3"
"@cowtech/eslint-config": "^7.10.1",
"@types/node": "^14.14.19",
"@types/tap": "^14.10.1",
"prettier": "^2.2.1",
"tap": "^14.11.0",
"ts-node": "^9.1.1"
},
"jest": {
"preset": "ts-jest",
"watchman": false,
"testRegex": ".+\\.spec\\.ts"
"engines": {
"node": ">=12.15.0"
}
}

@@ -6,3 +6,3 @@ # acquerello

[![Build](https://github.com/ShogunPanda/acquerello/workflows/CI/badge.svg)](https://github.com/ShogunPanda/acquerello/actions?query=workflow%3ACI)
[![Code Coverage](https://img.shields.io/codecov/c/gh/ShogunPanda/acquerello?token=d0ae1643f35c4c4f9714a357f796d05d)](https://codecov.io/gh/ShogunPanda/acquerello)
[![Code Coverage](https://img.shields.io/codecov/c/gh/ShogunPanda/acquerello?token=wUfs01bBGb)](https://codecov.io/gh/ShogunPanda/acquerello)

@@ -9,0 +9,0 @@ Template based terminal coloring made really easy.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc