@hot-updater/rock 0.33.0 → 0.33.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.
package/dist/index.cjs CHANGED
@@ -619,7 +619,7 @@ const fallbackSymbols = {
619
619
  const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
620
620
  Object.entries(specialMainSymbols);
621
621
  //#endregion
622
- //#region ../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
622
+ //#region ../../node_modules/.pnpm/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
623
623
  const hasColors = node_tty.default?.WriteStream?.prototype?.hasColors?.() ?? false;
624
624
  const format = (open, close) => {
625
625
  if (!hasColors) return (input) => input;
@@ -631,8 +631,9 @@ const format = (open, close) => {
631
631
  if (index === -1) return openCode + string + closeCode;
632
632
  let result = openCode;
633
633
  let lastIndex = 0;
634
+ const replaceCode = (close === 22 ? closeCode : "") + openCode;
634
635
  while (index !== -1) {
635
- result += string.slice(lastIndex, index) + openCode;
636
+ result += string.slice(lastIndex, index) + replaceCode;
636
637
  lastIndex = index + closeCode.length;
637
638
  index = string.indexOf(closeCode, lastIndex);
638
639
  }
@@ -3032,7 +3033,7 @@ function parseMilliseconds(milliseconds) {
3032
3033
  throw new TypeError("Expected a finite number or bigint");
3033
3034
  }
3034
3035
  //#endregion
3035
- //#region ../../node_modules/.pnpm/pretty-ms@9.2.0/node_modules/pretty-ms/index.js
3036
+ //#region ../../node_modules/.pnpm/pretty-ms@9.3.0/node_modules/pretty-ms/index.js
3036
3037
  const isZero = (value) => value === 0 || value === 0n;
3037
3038
  const pluralize = (word, count) => count === 1 || count === 1n ? word : `${word}s`;
3038
3039
  const SECOND_ROUNDING_EPSILON = 1e-7;
@@ -3081,7 +3082,7 @@ function prettyMilliseconds(milliseconds, options) {
3081
3082
  add(Number(parsed.hours), "hour", "h");
3082
3083
  }
3083
3084
  add(Number(parsed.minutes), "minute", "m");
3084
- if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
3085
+ if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
3085
3086
  const seconds = Number(parsed.seconds);
3086
3087
  const milliseconds = Number(parsed.milliseconds);
3087
3088
  const microseconds = Number(parsed.microseconds);
package/dist/index.mjs CHANGED
@@ -615,7 +615,7 @@ const fallbackSymbols = {
615
615
  const figures = isUnicodeSupported() ? mainSymbols : fallbackSymbols;
616
616
  Object.entries(specialMainSymbols);
617
617
  //#endregion
618
- //#region ../../node_modules/.pnpm/yoctocolors@2.1.1/node_modules/yoctocolors/base.js
618
+ //#region ../../node_modules/.pnpm/yoctocolors@2.1.2/node_modules/yoctocolors/base.js
619
619
  const hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
620
620
  const format = (open, close) => {
621
621
  if (!hasColors) return (input) => input;
@@ -627,8 +627,9 @@ const format = (open, close) => {
627
627
  if (index === -1) return openCode + string + closeCode;
628
628
  let result = openCode;
629
629
  let lastIndex = 0;
630
+ const replaceCode = (close === 22 ? closeCode : "") + openCode;
630
631
  while (index !== -1) {
631
- result += string.slice(lastIndex, index) + openCode;
632
+ result += string.slice(lastIndex, index) + replaceCode;
632
633
  lastIndex = index + closeCode.length;
633
634
  index = string.indexOf(closeCode, lastIndex);
634
635
  }
@@ -3028,7 +3029,7 @@ function parseMilliseconds(milliseconds) {
3028
3029
  throw new TypeError("Expected a finite number or bigint");
3029
3030
  }
3030
3031
  //#endregion
3031
- //#region ../../node_modules/.pnpm/pretty-ms@9.2.0/node_modules/pretty-ms/index.js
3032
+ //#region ../../node_modules/.pnpm/pretty-ms@9.3.0/node_modules/pretty-ms/index.js
3032
3033
  const isZero = (value) => value === 0 || value === 0n;
3033
3034
  const pluralize = (word, count) => count === 1 || count === 1n ? word : `${word}s`;
3034
3035
  const SECOND_ROUNDING_EPSILON = 1e-7;
@@ -3077,7 +3078,7 @@ function prettyMilliseconds(milliseconds, options) {
3077
3078
  add(Number(parsed.hours), "hour", "h");
3078
3079
  }
3079
3080
  add(Number(parsed.minutes), "minute", "m");
3080
- if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
3081
+ if (!options.hideSeconds) if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3 && !options.subSecondsAsDecimals) {
3081
3082
  const seconds = Number(parsed.seconds);
3082
3083
  const milliseconds = Number(parsed.milliseconds);
3083
3084
  const microseconds = Number(parsed.microseconds);
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@hot-updater/rock",
3
3
  "type": "module",
4
- "version": "0.33.0",
4
+ "version": "0.33.2",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.mjs",
8
8
  "types": "./dist/index.d.cts",
9
9
  "license": "MIT",
10
- "repository": "https://github.com/gronxb/hot-updater",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/gronxb/hot-updater"
13
+ },
11
14
  "author": "gronxb <gron1gh1@gmail.com> (https://github.com/gronxb)",
12
15
  "bugs": {
13
16
  "url": "https://github.com/gronxb/hot-updater/issues"
@@ -22,8 +25,8 @@
22
25
  ],
23
26
  "dependencies": {
24
27
  "uuidv7": "^1.0.2",
25
- "@hot-updater/cli-tools": "0.33.0",
26
- "@hot-updater/plugin-core": "0.33.0"
28
+ "@hot-updater/cli-tools": "0.33.2",
29
+ "@hot-updater/plugin-core": "0.33.2"
27
30
  },
28
31
  "devDependencies": {
29
32
  "@types/node": "^20",
@@ -54,14 +57,14 @@
54
57
  "3.1.1",
55
58
  "4.0.0"
56
59
  ],
57
- "pretty-ms": "9.2.0",
60
+ "pretty-ms": "9.3.0",
58
61
  "shebang-command": "2.0.0",
59
62
  "shebang-regex": "3.0.0",
60
63
  "signal-exit": "4.1.0",
61
64
  "strip-final-newline": "4.0.0",
62
65
  "unicorn-magic": "0.3.0",
63
66
  "which": "2.0.2",
64
- "yoctocolors": "2.1.1"
67
+ "yoctocolors": "2.1.2"
65
68
  },
66
69
  "scripts": {
67
70
  "build": "tsdown",