@aracna/telegram-bot 1.9.9 → 1.9.10

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/index.d.ts CHANGED
@@ -273,7 +273,7 @@ export declare interface HandlerOptions {
273
273
  export declare class HTMLUtils {
274
274
  static tags: string[];
275
275
  static sanitize(text: string): string;
276
- static progress(value: number, minimum?: number, maximum?: number, size?: number): string;
276
+ static progress(value: number, min?: number, max?: number, size?: number): string;
277
277
  }
278
278
 
279
279
  export declare class InlineKeyboardUtils {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Dario Sechi",
3
3
  "devDependencies": {
4
- "@aracna/core": "^1.1.73",
4
+ "@aracna/core": "^1.1.75",
5
5
  "@aracna/telegram-bot-types": "^1.2.9",
6
6
  "@microsoft/api-extractor": "^7.39.0",
7
7
  "@types/node": "^20.10.5",
@@ -23,7 +23,7 @@
23
23
  "directory": "dist"
24
24
  },
25
25
  "types": "index.d.ts",
26
- "version": "1.9.9",
26
+ "version": "1.9.10",
27
27
  "scripts": {
28
28
  "build": "rm -rf dist && pnpm tsc && pnpm api-extractor run --local",
29
29
  "prepublish": "pnpm test && pnpm build && pnpm version patch && cp LICENSE package.json README.md dist",
@@ -1,5 +1,5 @@
1
1
  export declare class HTMLUtils {
2
2
  static tags: string[];
3
3
  static sanitize(text: string): string;
4
- static progress(value: number, minimum?: number, maximum?: number, size?: number): string;
4
+ static progress(value: number, min?: number, max?: number, size?: number): string;
5
5
  }
@@ -10,10 +10,10 @@ class HTMLUtils {
10
10
  .replace(new RegExp(`(?<!(${this.tags.join('|')}))>`, 'gm'), '&gt;')
11
11
  .replace(/&/gm, '&amp;');
12
12
  }
13
- static progress(value, minimum = 0, maximum = 100, size = 20) {
13
+ static progress(value, min = 0, max = 100, size = 20) {
14
14
  let percentage, steps;
15
- percentage = (0, core_1.getNumberPercentage)(value, minimum, maximum);
16
- steps = new Array(size).fill(0).map((v, k) => ((k * maximum) / size < percentage ? '=' : ' '));
15
+ percentage = (0, core_1.getNumberPercentage)(value, { min, max });
16
+ steps = new Array(size).fill(0).map((v, k) => ((k * max) / size < percentage ? '=' : ' '));
17
17
  return `<code>[${steps.join('')}]</code>`;
18
18
  }
19
19
  }