@hot-updater/repack 0.21.7 → 0.21.8

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
@@ -5,9 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJS = (cb, mod) => function() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
8
  var __copyProps = (to, from, except, desc) => {
12
9
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
13
10
  key = keys[i];
@@ -24,82 +21,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
21
  }) : target, mod));
25
22
 
26
23
  //#endregion
24
+ let __hot_updater_cli_tools = require("@hot-updater/cli-tools");
25
+ __hot_updater_cli_tools = __toESM(__hot_updater_cli_tools);
27
26
  let fs = require("fs");
28
27
  fs = __toESM(fs);
29
28
  let path = require("path");
30
29
  path = __toESM(path);
31
30
 
32
- //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
33
- var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
34
- let p = process || {}, argv = p.argv || [], env = p.env || {};
35
- let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
36
- let formatter = (open, close, replace = open) => (input) => {
37
- let string = "" + input, index = string.indexOf(close, open.length);
38
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
39
- };
40
- let replaceClose = (string, close, replace, index) => {
41
- let result = "", cursor = 0;
42
- do {
43
- result += string.substring(cursor, index) + replace;
44
- cursor = index + close.length;
45
- index = string.indexOf(close, cursor);
46
- } while (~index);
47
- return result + string.substring(cursor);
48
- };
49
- let createColors = (enabled = isColorSupported) => {
50
- let f = enabled ? formatter : () => String;
51
- return {
52
- isColorSupported: enabled,
53
- reset: f("\x1B[0m", "\x1B[0m"),
54
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
55
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
56
- italic: f("\x1B[3m", "\x1B[23m"),
57
- underline: f("\x1B[4m", "\x1B[24m"),
58
- inverse: f("\x1B[7m", "\x1B[27m"),
59
- hidden: f("\x1B[8m", "\x1B[28m"),
60
- strikethrough: f("\x1B[9m", "\x1B[29m"),
61
- black: f("\x1B[30m", "\x1B[39m"),
62
- red: f("\x1B[31m", "\x1B[39m"),
63
- green: f("\x1B[32m", "\x1B[39m"),
64
- yellow: f("\x1B[33m", "\x1B[39m"),
65
- blue: f("\x1B[34m", "\x1B[39m"),
66
- magenta: f("\x1B[35m", "\x1B[39m"),
67
- cyan: f("\x1B[36m", "\x1B[39m"),
68
- white: f("\x1B[37m", "\x1B[39m"),
69
- gray: f("\x1B[90m", "\x1B[39m"),
70
- bgBlack: f("\x1B[40m", "\x1B[49m"),
71
- bgRed: f("\x1B[41m", "\x1B[49m"),
72
- bgGreen: f("\x1B[42m", "\x1B[49m"),
73
- bgYellow: f("\x1B[43m", "\x1B[49m"),
74
- bgBlue: f("\x1B[44m", "\x1B[49m"),
75
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
76
- bgCyan: f("\x1B[46m", "\x1B[49m"),
77
- bgWhite: f("\x1B[47m", "\x1B[49m"),
78
- blackBright: f("\x1B[90m", "\x1B[39m"),
79
- redBright: f("\x1B[91m", "\x1B[39m"),
80
- greenBright: f("\x1B[92m", "\x1B[39m"),
81
- yellowBright: f("\x1B[93m", "\x1B[39m"),
82
- blueBright: f("\x1B[94m", "\x1B[39m"),
83
- magentaBright: f("\x1B[95m", "\x1B[39m"),
84
- cyanBright: f("\x1B[96m", "\x1B[39m"),
85
- whiteBright: f("\x1B[97m", "\x1B[39m"),
86
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
87
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
88
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
89
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
90
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
91
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
92
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
93
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
94
- };
95
- };
96
- module.exports = createColors();
97
- module.exports.createColors = createColors;
98
- }) });
99
-
100
- //#endregion
101
31
  //#region ../../node_modules/.pnpm/uuidv7@1.0.2/node_modules/uuidv7/dist/index.js
102
- var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
103
32
  /**
104
33
  * uuidv7: A JavaScript implementation of UUID version 7
105
34
  *
@@ -438,7 +367,7 @@ const getBundleId = () => {
438
367
  if (fs.default.existsSync(bundleIdPath)) bundleId = fs.default.readFileSync(bundleIdPath, "utf-8");
439
368
  else {
440
369
  fs.default.writeFileSync(bundleIdPath, bundleId);
441
- console.log(import_picocolors.default.green(`[HotUpdater] Generated bundle ID: ${bundleId}`));
370
+ console.log(__hot_updater_cli_tools.colors.green(`[HotUpdater] Generated bundle ID: ${bundleId}`));
442
371
  }
443
372
  return bundleId;
444
373
  };
package/dist/index.js CHANGED
@@ -1,103 +1,8 @@
1
+ import { colors } from "@hot-updater/cli-tools";
1
2
  import fs from "fs";
2
3
  import path from "path";
3
4
 
4
- //#region rolldown:runtime
5
- var __create = Object.create;
6
- var __defProp = Object.defineProperty;
7
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
- var __getOwnPropNames = Object.getOwnPropertyNames;
9
- var __getProtoOf = Object.getPrototypeOf;
10
- var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __commonJS = (cb, mod) => function() {
12
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
- };
14
- var __copyProps = (to, from, except, desc) => {
15
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
16
- key = keys[i];
17
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: ((k) => from[k]).bind(null, key),
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
- value: mod,
26
- enumerable: true
27
- }) : target, mod));
28
-
29
- //#endregion
30
- //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
31
- var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
32
- let p = process || {}, argv = p.argv || [], env = p.env || {};
33
- let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
34
- let formatter = (open, close, replace = open) => (input) => {
35
- let string = "" + input, index = string.indexOf(close, open.length);
36
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
37
- };
38
- let replaceClose = (string, close, replace, index) => {
39
- let result = "", cursor = 0;
40
- do {
41
- result += string.substring(cursor, index) + replace;
42
- cursor = index + close.length;
43
- index = string.indexOf(close, cursor);
44
- } while (~index);
45
- return result + string.substring(cursor);
46
- };
47
- let createColors = (enabled = isColorSupported) => {
48
- let f = enabled ? formatter : () => String;
49
- return {
50
- isColorSupported: enabled,
51
- reset: f("\x1B[0m", "\x1B[0m"),
52
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
53
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
54
- italic: f("\x1B[3m", "\x1B[23m"),
55
- underline: f("\x1B[4m", "\x1B[24m"),
56
- inverse: f("\x1B[7m", "\x1B[27m"),
57
- hidden: f("\x1B[8m", "\x1B[28m"),
58
- strikethrough: f("\x1B[9m", "\x1B[29m"),
59
- black: f("\x1B[30m", "\x1B[39m"),
60
- red: f("\x1B[31m", "\x1B[39m"),
61
- green: f("\x1B[32m", "\x1B[39m"),
62
- yellow: f("\x1B[33m", "\x1B[39m"),
63
- blue: f("\x1B[34m", "\x1B[39m"),
64
- magenta: f("\x1B[35m", "\x1B[39m"),
65
- cyan: f("\x1B[36m", "\x1B[39m"),
66
- white: f("\x1B[37m", "\x1B[39m"),
67
- gray: f("\x1B[90m", "\x1B[39m"),
68
- bgBlack: f("\x1B[40m", "\x1B[49m"),
69
- bgRed: f("\x1B[41m", "\x1B[49m"),
70
- bgGreen: f("\x1B[42m", "\x1B[49m"),
71
- bgYellow: f("\x1B[43m", "\x1B[49m"),
72
- bgBlue: f("\x1B[44m", "\x1B[49m"),
73
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
74
- bgCyan: f("\x1B[46m", "\x1B[49m"),
75
- bgWhite: f("\x1B[47m", "\x1B[49m"),
76
- blackBright: f("\x1B[90m", "\x1B[39m"),
77
- redBright: f("\x1B[91m", "\x1B[39m"),
78
- greenBright: f("\x1B[92m", "\x1B[39m"),
79
- yellowBright: f("\x1B[93m", "\x1B[39m"),
80
- blueBright: f("\x1B[94m", "\x1B[39m"),
81
- magentaBright: f("\x1B[95m", "\x1B[39m"),
82
- cyanBright: f("\x1B[96m", "\x1B[39m"),
83
- whiteBright: f("\x1B[97m", "\x1B[39m"),
84
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
85
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
86
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
87
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
88
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
89
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
90
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
91
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
92
- };
93
- };
94
- module.exports = createColors();
95
- module.exports.createColors = createColors;
96
- }) });
97
-
98
- //#endregion
99
5
  //#region ../../node_modules/.pnpm/uuidv7@1.0.2/node_modules/uuidv7/dist/index.js
100
- var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
101
6
  /**
102
7
  * uuidv7: A JavaScript implementation of UUID version 7
103
8
  *
@@ -436,7 +341,7 @@ const getBundleId = () => {
436
341
  if (fs.existsSync(bundleIdPath)) bundleId = fs.readFileSync(bundleIdPath, "utf-8");
437
342
  else {
438
343
  fs.writeFileSync(bundleIdPath, bundleId);
439
- console.log(import_picocolors.default.green(`[HotUpdater] Generated bundle ID: ${bundleId}`));
344
+ console.log(colors.green(`[HotUpdater] Generated bundle ID: ${bundleId}`));
440
345
  }
441
346
  return bundleId;
442
347
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/repack",
3
3
  "type": "module",
4
- "version": "0.21.7",
4
+ "version": "0.21.8",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -25,14 +25,14 @@
25
25
  "@rspack/core": "1.3.7",
26
26
  "@types/node": "^20",
27
27
  "es-toolkit": "^1.32.0",
28
- "picocolors": "1.1.1",
29
28
  "uuidv7": "^1.0.2"
30
29
  },
31
30
  "peerDependencies": {
32
31
  "@callstack/repack": "*"
33
32
  },
34
33
  "dependencies": {
35
- "@hot-updater/plugin-core": "0.21.7"
34
+ "@hot-updater/cli-tools": "0.21.8",
35
+ "@hot-updater/plugin-core": "0.21.8"
36
36
  },
37
37
  "exports": {
38
38
  ".": {