standard-log-color 11.2.0 → 11.2.2

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.
@@ -1,10 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  var standard_log_1 = require("standard-log");
7
- var assertron_1 = __importDefault(require("assertron"));
4
+ var assertron_1 = require("assertron");
8
5
  var satisfier_1 = require("satisfier");
9
6
  var cssFormatter_js_1 = require("./cssFormatter.js");
10
7
  var cssFormatter = (0, cssFormatter_js_1.createCssFormatter)();
@@ -21,7 +18,7 @@ test('support color template', function () {
21
18
  args: ['%c SomeColored Text %c AnotherColor', 'color:blue;', 'color:red;', 'not colored'],
22
19
  timestamp: new Date()
23
20
  });
24
- assertron_1.default.satisfies(actual, [
21
+ assertron_1.a.satisfies(actual, [
25
22
  '%c color-template %c SomeColored Text %c AnotherColor',
26
23
  'padding: 2px; margin: 2px; line-height: 1.8em;background: #96005a;border: 1px solid #76003a;color: #ffffff;',
27
24
  'color:blue;',
@@ -1 +1 @@
1
- {"version":3,"file":"cssFormatter.spec.js","sourceRoot":"","sources":["../../ts/css/cssFormatter.spec.ts"],"names":[],"mappings":";;;;;AAAA,6CAAwC;AACxC,wDAAyB;AACzB,uCAAoC;AACpC,qDAAsD;AAEtD,IAAM,YAAY,GAAG,IAAA,oCAAkB,GAAE,CAAA;AAEzC,IAAI,CAAC,qCAAqC,EAAE;IAC1C,IAAM,CAAC,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAA;IACpG,IAAM,CAAC,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAA;IACpG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,6GAA6G,CAAC,CAAA;IACnI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC5B,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,wBAAwB,EAAE;IAC7B,IAAM,MAAM,GAAG,YAAY,CAAC;QAC1B,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,wBAAS,CAAC,QAAQ;QACzB,IAAI,EAAE,CAAC,qCAAqC,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,CAAC;QACzF,SAAS,EAAE,IAAI,IAAI,EAAE;KACtB,CAAC,CAAA;IACF,mBAAC,CAAC,SAAS,CAAC,MAAM,EAAE;QAClB,uDAAuD;QACvD,6GAA6G;QAC7G,aAAa;QACb,YAAY;QACZ,aAAa;QACb,oBAAQ;KACT,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { logLevels } from 'standard-log'\nimport a from 'assertron'\nimport { anything } from 'satisfier'\nimport { createCssFormatter } from './cssFormatter.js'\n\nconst cssFormatter = createCssFormatter()\n\ntest('same logger will get the same color', () => {\n const a = cssFormatter({ id: 'log', level: logLevels.critical, args: ['a'], timestamp: new Date() })\n const b = cssFormatter({ id: 'log', level: logLevels.critical, args: ['a'], timestamp: new Date() })\n expect(a[1]).toEqual('padding: 2px; margin: 2px; line-height: 1.8em;background: #96005a;border: 1px solid #76003a;color: #ffffff;')\n expect(a[1]).toEqual(b[1])\n})\n\ntest('support color template', () => {\n const actual = cssFormatter({\n id: 'color-template',\n level: logLevels.critical,\n args: ['%c SomeColored Text %c AnotherColor', 'color:blue;', 'color:red;', 'not colored'],\n timestamp: new Date()\n })\n a.satisfies(actual, [\n '%c color-template %c SomeColored Text %c AnotherColor',\n 'padding: 2px; margin: 2px; line-height: 1.8em;background: #96005a;border: 1px solid #76003a;color: #ffffff;',\n 'color:blue;',\n 'color:red;',\n 'not colored',\n anything\n ])\n})\n"]}
1
+ {"version":3,"file":"cssFormatter.spec.js","sourceRoot":"","sources":["../../ts/css/cssFormatter.spec.ts"],"names":[],"mappings":";;AAAA,6CAAwC;AACxC,uCAA6B;AAC7B,uCAAoC;AACpC,qDAAsD;AAEtD,IAAM,YAAY,GAAG,IAAA,oCAAkB,GAAE,CAAA;AAEzC,IAAI,CAAC,qCAAqC,EAAE;IAC1C,IAAM,CAAC,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAA;IACpG,IAAM,CAAC,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAA;IACpG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,6GAA6G,CAAC,CAAA;IACnI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC5B,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,wBAAwB,EAAE;IAC7B,IAAM,MAAM,GAAG,YAAY,CAAC;QAC1B,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,wBAAS,CAAC,QAAQ;QACzB,IAAI,EAAE,CAAC,qCAAqC,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,CAAC;QACzF,SAAS,EAAE,IAAI,IAAI,EAAE;KACtB,CAAC,CAAA;IACF,aAAC,CAAC,SAAS,CAAC,MAAM,EAAE;QAClB,uDAAuD;QACvD,6GAA6G;QAC7G,aAAa;QACb,YAAY;QACZ,aAAa;QACb,oBAAQ;KACT,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { logLevels } from 'standard-log'\nimport { a } from 'assertron'\nimport { anything } from 'satisfier'\nimport { createCssFormatter } from './cssFormatter.js'\n\nconst cssFormatter = createCssFormatter()\n\ntest('same logger will get the same color', () => {\n const a = cssFormatter({ id: 'log', level: logLevels.critical, args: ['a'], timestamp: new Date() })\n const b = cssFormatter({ id: 'log', level: logLevels.critical, args: ['a'], timestamp: new Date() })\n expect(a[1]).toEqual('padding: 2px; margin: 2px; line-height: 1.8em;background: #96005a;border: 1px solid #76003a;color: #ffffff;')\n expect(a[1]).toEqual(b[1])\n})\n\ntest('support color template', () => {\n const actual = cssFormatter({\n id: 'color-template',\n level: logLevels.critical,\n args: ['%c SomeColored Text %c AnotherColor', 'color:blue;', 'color:red;', 'not colored'],\n timestamp: new Date()\n })\n a.satisfies(actual, [\n '%c color-template %c SomeColored Text %c AnotherColor',\n 'padding: 2px; margin: 2px; line-height: 1.8em;background: #96005a;border: 1px solid #76003a;color: #ffffff;',\n 'color:blue;',\n 'color:red;',\n 'not colored',\n anything\n ])\n})\n"]}
@@ -1,5 +1,5 @@
1
1
  import { logLevels } from 'standard-log';
2
- import a from 'assertron';
2
+ import { a } from 'assertron';
3
3
  import { anything } from 'satisfier';
4
4
  import { createCssFormatter } from './cssFormatter.js';
5
5
  const cssFormatter = createCssFormatter();
@@ -1 +1 @@
1
- {"version":3,"file":"cssFormatter.spec.js","sourceRoot":"","sources":["../../ts/css/cssFormatter.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,CAAC,MAAM,WAAW,CAAA;AACzB,OAAO,EAAE,QAAQ,E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'\nimport { anything } from 'satisfier'\nimport { createCssFormatter } from './cssFormatter.js'\n\nconst cssFormatter = createCssFormatter()\n\ntest('same logger will get the same color', () => {\n const a = cssFormatter({ id: 'log', level: logLevels.critical, args: ['a'], timestamp: new Date() })\n const b = cssFormatter({ id: 'log', level: logLevels.critical, args: ['a'], timestamp: new Date() })\n expect(a[1]).toEqual('padding: 2px; margin: 2px; line-height: 1.8em;background: #96005a;border: 1px solid #76003a;color: #ffffff;')\n expect(a[1]).toEqual(b[1])\n})\n\ntest('support color template', () => {\n const actual = cssFormatter({\n id: 'color-template',\n level: logLevels.critical,\n args: ['%c SomeColored Text %c AnotherColor', 'color:blue;', 'color:red;', 'not colored'],\n timestamp: new Date()\n })\n a.satisfies(actual, [\n '%c color-template %c SomeColored Text %c AnotherColor',\n 'padding: 2px; margin: 2px; line-height: 1.8em;background: #96005a;border: 1px solid #76003a;color: #ffffff;',\n 'color:blue;',\n 'color:red;',\n 'not colored',\n anything\n ])\n})\n"]}
1
+ {"version":3,"file":"cssFormatter.spec.js","sourceRoot":"","sources":["../../ts/css/cssFormatter.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD,MAAM,YAAY,GAAG,kBAAkB,EAAE,CAAA;AAEzC,IAAI,CAAC,qCAAqC,EAAE,GAAG,EAAE;IAC/C,MAAM,CAAC,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAA;IACpG,MAAM,CAAC,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC,CAAA;IACpG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,6GAA6G,CAAC,CAAA;IACnI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC5B,CAAC,CAAC,CAAA;AAEF,IAAI,CAAC,wBAAwB,EAAE,GAAG,EAAE;IAClC,MAAM,MAAM,GAAG,YAAY,CAAC;QAC1B,EAAE,EAAE,gBAAgB;QACpB,KAAK,EAAE,SAAS,CAAC,QAAQ;QACzB,IAAI,EAAE,CAAC,qCAAqC,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,CAAC;QACzF,SAAS,EAAE,IAAI,IAAI,EAAE;KACtB,CAAC,CAAA;IACF,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE;QAClB,uDAAuD;QACvD,6GAA6G;QAC7G,aAAa;QACb,YAAY;QACZ,aAAa;QACb,QAAQ;KACT,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { logLevels } from 'standard-log'\nimport { a } from 'assertron'\nimport { anything } from 'satisfier'\nimport { createCssFormatter } from './cssFormatter.js'\n\nconst cssFormatter = createCssFormatter()\n\ntest('same logger will get the same color', () => {\n const a = cssFormatter({ id: 'log', level: logLevels.critical, args: ['a'], timestamp: new Date() })\n const b = cssFormatter({ id: 'log', level: logLevels.critical, args: ['a'], timestamp: new Date() })\n expect(a[1]).toEqual('padding: 2px; margin: 2px; line-height: 1.8em;background: #96005a;border: 1px solid #76003a;color: #ffffff;')\n expect(a[1]).toEqual(b[1])\n})\n\ntest('support color template', () => {\n const actual = cssFormatter({\n id: 'color-template',\n level: logLevels.critical,\n args: ['%c SomeColored Text %c AnotherColor', 'color:blue;', 'color:red;', 'not colored'],\n timestamp: new Date()\n })\n a.satisfies(actual, [\n '%c color-template %c SomeColored Text %c AnotherColor',\n 'padding: 2px; margin: 2px; line-height: 1.8em;background: #96005a;border: 1px solid #76003a;color: #ffffff;',\n 'color:blue;',\n 'color:red;',\n 'not colored',\n anything\n ])\n})\n"]}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "standard-log-color",
3
- "version": "11.2.0",
3
+ "version": "11.2.2",
4
4
  "description": "Color console reporter for `standard-log`",
5
- "homepage": "https://github.com/unional/standard-log/tree/master/packages/color",
5
+ "homepage": "https://github.com/unional/standard-log/tree/main/packages/color",
6
6
  "bugs": {
7
7
  "url": "https://github.com/unional/standard-log/issues"
8
8
  },
@@ -76,7 +76,7 @@
76
76
  "rimraf": "^3.0.2",
77
77
  "satisfier": "^5.2.2",
78
78
  "size-limit": "^8.1.0",
79
- "standard-log": "11.2.0",
79
+ "standard-log": "11.2.2",
80
80
  "ts-jest": "^29.0.3",
81
81
  "ts-loader": "^9.3.0",
82
82
  "tslib": "^2.4.0",