@figliolia/chalk-animation 1.0.3 → 1.0.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.
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Animation = void 0;
4
- const FrameRate_1 = require("./FrameRate");
5
4
  const Decor_1 = require("./Decor");
5
+ const FrameRate_1 = require("./FrameRate");
6
6
  class Animation extends FrameRate_1.FrameRate {
7
7
  constructor(effect, str, delay = 0, speed = 0) {
8
8
  super(delay, speed);
@@ -2,8 +2,8 @@
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.ChalkAnimation = void 0;
5
- const Effects_1 = require("./Effects");
6
5
  const Animation_1 = require("./Animation");
6
+ const Effects_1 = require("./Effects");
7
7
  /**
8
8
  * Chalk Animation
9
9
  *
@@ -111,6 +111,7 @@ class Effects {
111
111
  chalk_1.default.white(str.substr(chars)));
112
112
  }
113
113
  }
114
+ exports.Effects = Effects;
114
115
  Effects.longHsv = { interpolation: "hsv", hsvSpin: "long" };
115
116
  Effects.glitchChars = "x*0987654321[]0-~@#(____!!!!\\|?????....0000\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
116
117
  __decorate([
@@ -131,4 +132,3 @@ __decorate([
131
132
  __decorate([
132
133
  Decor_1.Decor.bound
133
134
  ], Effects, "karaoke", null);
134
- exports.Effects = Effects;
@@ -5,18 +5,18 @@ exports.InstanceTracker = void 0;
5
5
  const event_emitter_1 = require("@figliolia/event-emitter");
6
6
  class InstanceTracker {
7
7
  constructor() {
8
- InstanceTracker.clearAll();
9
- this.ID = InstanceTracker.IDs.get();
10
- InstanceTracker.bucket.set(this.ID, this.instance);
8
+ _a.clearAll();
9
+ this.ID = _a.IDs.get();
10
+ _a.bucket.set(this.ID, this.instance);
11
11
  }
12
12
  get instance() {
13
13
  return this;
14
14
  }
15
15
  static clearAll() {
16
- for (const [, animation] of InstanceTracker.bucket) {
16
+ for (const [, animation] of _a.bucket) {
17
17
  animation.stop();
18
18
  }
19
- InstanceTracker.bucket.clear();
19
+ _a.bucket.clear();
20
20
  }
21
21
  }
22
22
  exports.InstanceTracker = InstanceTracker;
@@ -29,7 +29,7 @@ InstanceTracker.loggers = ["log", "warn", "info", "error"];
29
29
  _a.loggers.forEach(method => {
30
30
  const original = console[method];
31
31
  console[method] = function (...args) {
32
- InstanceTracker.clearAll();
32
+ _a.clearAll();
33
33
  return original.apply(console, args);
34
34
  };
35
35
  });
@@ -1,5 +1,5 @@
1
- import { FrameRate } from "./FrameRate.js";
2
1
  import { Decor } from "./Decor.js";
2
+ import { FrameRate } from "./FrameRate.js";
3
3
  export class Animation extends FrameRate {
4
4
  lines;
5
5
  text;
@@ -1,5 +1,5 @@
1
- import { Effects } from "./Effects.js";
2
1
  import { Animation } from "./Animation.js";
2
+ import { Effects } from "./Effects.js";
3
3
  /**
4
4
  * Chalk Animation
5
5
  *
@@ -1,5 +1,5 @@
1
- import type { AnimationFN } from "./types";
2
1
  import { FrameRate } from "./FrameRate";
2
+ import type { AnimationFN } from "./types";
3
3
  export declare class Animation extends FrameRate {
4
4
  lines: number;
5
5
  text: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@figliolia/chalk-animation",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "An ESM/Common.js compatible typescript port of the popular 'chalk-animation' library",
5
5
  "keywords": [
6
6
  "animation",
@@ -43,9 +43,9 @@
43
43
  "src/*"
44
44
  ],
45
45
  "scripts": {
46
- "build": "npx ts-packager -e src",
47
- "lint": "tsc --noemit && eslint ./ --fix",
48
- "test": "jest"
46
+ "build": "ts-packager -e src",
47
+ "lint": "tsx ci/commands/Lint.ts",
48
+ "test": "tsx ci/commands/Test.ts"
49
49
  },
50
50
  "dependencies": {
51
51
  "@figliolia/event-emitter": "^1.1.1",
@@ -53,10 +53,11 @@
53
53
  "gradient-string": "^2.0.2"
54
54
  },
55
55
  "devDependencies": {
56
- "@figliolia/ts-packager": "^1.0.3",
57
- "@swc/core": "^1.3.99",
58
- "@types/gradient-string": "^1.1.5",
59
- "@types/jest": "^29.5.10",
56
+ "@figliolia/child-process": "^1.0.1",
57
+ "@figliolia/ts-packager": "^1.1.0",
58
+ "@types/gradient-string": "^1.1.6",
59
+ "@types/jest": "^29.5.12",
60
+ "@types/node": "^20.11.19",
60
61
  "@typescript-eslint/eslint-plugin": "^5.59.1",
61
62
  "@typescript-eslint/parser": "^5.59.1",
62
63
  "eslint": "^8.39.0",
@@ -66,13 +67,16 @@
66
67
  "eslint-import-resolver-typescript": "^3.6.1",
67
68
  "eslint-plugin-import": "^2.27.5",
68
69
  "eslint-plugin-json-format": "^2.0.1",
69
- "eslint-plugin-prettier": "^4.2.1",
70
+ "eslint-plugin-prettier": "^5.1.3",
70
71
  "eslint-plugin-simple-import-sort": "^10.0.0",
72
+ "eslint-plugin-unused-imports": "3",
71
73
  "jest": "^29.7.0",
72
- "prettier": "^2.8.8",
73
- "ts-jest": "^29.1.1",
74
- "ts-node": "^10.9.1",
75
- "typescript": "^4.4.2"
74
+ "prettier": "^3.2.4",
75
+ "ts-jest": "^29.2.4",
76
+ "ts-node": "^10.9.2",
77
+ "tsc-alias": "^1.8.8",
78
+ "tsx": "^4.7.1",
79
+ "typescript": "^5.3.3"
76
80
  },
77
81
  "engines": {
78
82
  "node": ">=16"
package/src/Animation.ts CHANGED
@@ -1,6 +1,6 @@
1
- import type { AnimationFN } from "./types";
2
- import { FrameRate } from "./FrameRate";
3
1
  import { Decor } from "./Decor";
2
+ import { FrameRate } from "./FrameRate";
3
+ import type { AnimationFN } from "./types";
4
4
 
5
5
  export class Animation extends FrameRate {
6
6
  lines: number;
@@ -1,5 +1,5 @@
1
- import { Effects } from "./Effects";
2
1
  import { Animation } from "./Animation";
2
+ import { Effects } from "./Effects";
3
3
  import type { AnimationName } from "./types";
4
4
 
5
5
  /**