@hot-updater/plugin-core 0.20.2 → 0.20.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.
package/dist/index.cjs CHANGED
@@ -16362,28 +16362,47 @@ function merge(target, source) {
16362
16362
 
16363
16363
  //#endregion
16364
16364
  //#region src/loadConfig.ts
16365
- const getDefaultConfig = () => {
16365
+ const getDefaultPlatformConfig = () => {
16366
16366
  let infoPlistPaths = [];
16367
16367
  try {
16368
- const plistFiles = fast_glob.default.sync("*/Info.plist", {
16368
+ const plistFiles = fast_glob.default.sync("**/Info.plist", {
16369
16369
  cwd: path.default.join(getCwd(), "ios"),
16370
16370
  absolute: false,
16371
- onlyFiles: true
16371
+ onlyFiles: true,
16372
+ ignore: [
16373
+ "**/Pods/**",
16374
+ "**/build/**",
16375
+ "**/Build/**",
16376
+ "**/*.app/**",
16377
+ "**/*.xcarchive/**"
16378
+ ]
16372
16379
  });
16373
16380
  if (plistFiles.length > 0) infoPlistPaths = plistFiles.map((file) => `ios/${file}`);
16374
16381
  } catch (error) {}
16382
+ let stringResourcePaths = [];
16383
+ try {
16384
+ const stringsFiles = fast_glob.default.sync(path.default.join("**", "strings.xml"), {
16385
+ cwd: path.default.join(getCwd(), "android"),
16386
+ absolute: false,
16387
+ onlyFiles: true
16388
+ });
16389
+ if (stringsFiles.length > 0) stringResourcePaths = stringsFiles.map((file) => path.default.join("android", file));
16390
+ } catch (error) {}
16391
+ return {
16392
+ android: { stringResourcePaths },
16393
+ ios: { infoPlistPaths }
16394
+ };
16395
+ };
16396
+ const getDefaultConfig = () => {
16375
16397
  return {
16376
16398
  releaseChannel: "production",
16377
- updateStrategy: "fingerprint",
16399
+ updateStrategy: "appVersion",
16378
16400
  fingerprint: {
16379
16401
  extraSources: [],
16380
16402
  ignorePaths: []
16381
16403
  },
16382
16404
  console: { port: 1422 },
16383
- platform: {
16384
- android: { stringResourcePaths: ["android/app/src/main/res/values/strings.xml"] },
16385
- ios: { infoPlistPaths }
16386
- },
16405
+ platform: getDefaultPlatformConfig(),
16387
16406
  nativeBuild: { android: {
16388
16407
  aab: true,
16389
16408
  variant: "Release",
@@ -16784,7 +16803,6 @@ function assembleStyles$1() {
16784
16803
  return styles$2;
16785
16804
  }
16786
16805
  const ansiStyles$1 = assembleStyles$1();
16787
- var ansi_styles_default$1 = ansiStyles$1;
16788
16806
 
16789
16807
  //#endregion
16790
16808
  //#region ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js
@@ -16873,7 +16891,6 @@ const supportsColor = {
16873
16891
  stdout: createSupportsColor({ isTTY: node_tty.default.isatty(1) }),
16874
16892
  stderr: createSupportsColor({ isTTY: node_tty.default.isatty(2) })
16875
16893
  };
16876
- var supports_color_default = supportsColor;
16877
16894
 
16878
16895
  //#endregion
16879
16896
  //#region ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/utilities.js
@@ -16906,7 +16923,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
16906
16923
 
16907
16924
  //#endregion
16908
16925
  //#region ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/index.js
16909
- const { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
16926
+ const { stdout: stdoutColor, stderr: stderrColor } = supportsColor;
16910
16927
  const GENERATOR = Symbol("GENERATOR");
16911
16928
  const STYLER = Symbol("STYLER");
16912
16929
  const IS_EMPTY = Symbol("IS_EMPTY");
@@ -16932,7 +16949,7 @@ function createChalk(options) {
16932
16949
  return chalkFactory(options);
16933
16950
  }
16934
16951
  Object.setPrototypeOf(createChalk.prototype, Function.prototype);
16935
- for (const [styleName, style] of Object.entries(ansi_styles_default$1)) styles$1[styleName] = { get() {
16952
+ for (const [styleName, style] of Object.entries(ansiStyles$1)) styles$1[styleName] = { get() {
16936
16953
  const builder$1 = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
16937
16954
  Object.defineProperty(this, styleName, { value: builder$1 });
16938
16955
  return builder$1;
@@ -16944,12 +16961,12 @@ styles$1.visible = { get() {
16944
16961
  } };
16945
16962
  const getModelAnsi = (model, level, type, ...arguments_) => {
16946
16963
  if (model === "rgb") {
16947
- if (level === "ansi16m") return ansi_styles_default$1[type].ansi16m(...arguments_);
16948
- if (level === "ansi256") return ansi_styles_default$1[type].ansi256(ansi_styles_default$1.rgbToAnsi256(...arguments_));
16949
- return ansi_styles_default$1[type].ansi(ansi_styles_default$1.rgbToAnsi(...arguments_));
16964
+ if (level === "ansi16m") return ansiStyles$1[type].ansi16m(...arguments_);
16965
+ if (level === "ansi256") return ansiStyles$1[type].ansi256(ansiStyles$1.rgbToAnsi256(...arguments_));
16966
+ return ansiStyles$1[type].ansi(ansiStyles$1.rgbToAnsi(...arguments_));
16950
16967
  }
16951
- if (model === "hex") return getModelAnsi("rgb", level, type, ...ansi_styles_default$1.hexToRgb(...arguments_));
16952
- return ansi_styles_default$1[type][model](...arguments_);
16968
+ if (model === "hex") return getModelAnsi("rgb", level, type, ...ansiStyles$1.hexToRgb(...arguments_));
16969
+ return ansiStyles$1[type][model](...arguments_);
16953
16970
  };
16954
16971
  const usedModels = [
16955
16972
  "rgb",
@@ -16960,7 +16977,7 @@ for (const model of usedModels) {
16960
16977
  styles$1[model] = { get() {
16961
16978
  const { level } = this;
16962
16979
  return function(...arguments_) {
16963
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default$1.color.close, this[STYLER]);
16980
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansiStyles$1.color.close, this[STYLER]);
16964
16981
  return createBuilder(this, styler, this[IS_EMPTY]);
16965
16982
  };
16966
16983
  } };
@@ -16968,7 +16985,7 @@ for (const model of usedModels) {
16968
16985
  styles$1[bgModel] = { get() {
16969
16986
  const { level } = this;
16970
16987
  return function(...arguments_) {
16971
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default$1.bgColor.close, this[STYLER]);
16988
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansiStyles$1.bgColor.close, this[STYLER]);
16972
16989
  return createBuilder(this, styler, this[IS_EMPTY]);
16973
16990
  };
16974
16991
  } };
@@ -17027,7 +17044,6 @@ const applyStyle = (self$1, string) => {
17027
17044
  Object.defineProperties(createChalk.prototype, styles$1);
17028
17045
  const chalk = createChalk();
17029
17046
  const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
17030
- var source_default = chalk;
17031
17047
 
17032
17048
  //#endregion
17033
17049
  //#region ../../node_modules/.pnpm/widest-line@5.0.0/node_modules/widest-line/index.js
@@ -17479,7 +17495,6 @@ function assembleStyles() {
17479
17495
  return styles;
17480
17496
  }
17481
17497
  const ansiStyles = assembleStyles();
17482
- var ansi_styles_default = ansiStyles;
17483
17498
 
17484
17499
  //#endregion
17485
17500
  //#region ../../node_modules/.pnpm/wrap-ansi@9.0.0/node_modules/wrap-ansi/index.js
@@ -17591,7 +17606,7 @@ const exec = (string, columns, options = {}) => {
17591
17606
  escapeCode = code$1 === END_CODE ? void 0 : code$1;
17592
17607
  } else if (groups.uri !== void 0) escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
17593
17608
  }
17594
- const code = ansi_styles_default.codes.get(Number(escapeCode));
17609
+ const code = ansiStyles.codes.get(Number(escapeCode));
17595
17610
  if (pre[index + 1] === "\n") {
17596
17611
  if (escapeUrl) returnValue += wrapAnsiHyperlink("");
17597
17612
  if (escapeCode && code) returnValue += wrapAnsiCode(code);
@@ -17736,7 +17751,7 @@ const makeContentText = (text, { padding, width, textAlignment, height }) => {
17736
17751
  const boxContent = (content, contentWidth, options) => {
17737
17752
  const colorizeBorder = (border) => {
17738
17753
  const newBorder = options.borderColor ? getColorFunction(options.borderColor)(border) : border;
17739
- return options.dimBorder ? source_default.dim(newBorder) : newBorder;
17754
+ return options.dimBorder ? chalk.dim(newBorder) : newBorder;
17740
17755
  };
17741
17756
  const colorizeContent = (content$1) => options.backgroundColor ? getBGColorFunction(options.backgroundColor)(content$1) : content$1;
17742
17757
  const chars = getBorderChars(options.borderStyle);
@@ -17811,9 +17826,9 @@ const determineDimensions = (text, options) => {
17811
17826
  return options;
17812
17827
  };
17813
17828
  const isHex = (color) => color.match(/^#(?:[0-f]{3}){1,2}$/i);
17814
- const isColorValid = (color) => typeof color === "string" && (source_default[color] ?? isHex(color));
17815
- const getColorFunction = (color) => isHex(color) ? source_default.hex(color) : source_default[color];
17816
- const getBGColorFunction = (color) => isHex(color) ? source_default.bgHex(color) : source_default[camelCase(["bg", color])];
17829
+ const isColorValid = (color) => typeof color === "string" && (chalk[color] ?? isHex(color));
17830
+ const getColorFunction = (color) => isHex(color) ? chalk.hex(color) : chalk[color];
17831
+ const getBGColorFunction = (color) => isHex(color) ? chalk.bgHex(color) : chalk[camelCase(["bg", color])];
17817
17832
  function boxen(text, options) {
17818
17833
  options = {
17819
17834
  padding: 0,
@@ -27139,7 +27154,7 @@ var ConfigBuilder = class {
27139
27154
  if (!this.buildType) throw new Error("Build type must be set using .setBuildType()");
27140
27155
  switch (this.buildType) {
27141
27156
  case "bare": return "bare({ enableHermes: true })";
27142
- case "rnef": return "rnef()";
27157
+ case "rock": return "rock()";
27143
27158
  case "expo": return "expo()";
27144
27159
  default: throw new Error(`Invalid build type: ${this.buildType}`);
27145
27160
  }
@@ -27191,7 +27206,7 @@ export default defineConfig({
27191
27206
  build: ${buildConfigString},
27192
27207
  storage: ${this.storageInfo.configString},
27193
27208
  database: ${this.databaseInfo.configString},
27194
- updateStrategy: "fingerprint",
27209
+ updateStrategy: "appVersion", // or "fingerprint"
27195
27210
  });
27196
27211
  `.trim();
27197
27212
  }
package/dist/index.d.cts CHANGED
@@ -88,7 +88,8 @@ interface PlatformConfig {
88
88
  /**
89
89
  * Android string resource paths.
90
90
  *
91
- * @default ["android/app/src/main/res/values/strings.xml"]
91
+ * @default all strings.xml files in the android directory
92
+ * @example ["android/app/src/main/res/values/strings.xml"]
92
93
  */
93
94
  stringResourcePaths?: string[];
94
95
  };
@@ -99,7 +100,8 @@ interface PlatformConfig {
99
100
  /**
100
101
  * iOS info.plist paths.
101
102
  *
102
- * @default ["ios/\*\/Info.plist"]
103
+ * @default all Info.plist files in the ios directory
104
+ * @example ["ios/HotUpdaterExample/Info.plist"]
103
105
  */
104
106
  infoPlistPaths?: string[];
105
107
  };
@@ -157,9 +159,11 @@ type ConfigInput = {
157
159
  * The strategy used to update the app.
158
160
  *
159
161
  * If `fingerprint`, the bundle will be updated if the fingerprint of the app is changed.
160
- * If `app-version`, the bundle will be updated if the target app version is valid.
162
+ * @docs https://hot-updater.dev/guide/update-strategy/1_fingerprint
163
+ * If `appVersion`, the bundle will be updated if the target app version is valid.
164
+ * @docs https://hot-updater.dev/guide/update-strategy/2_app-version
161
165
  *
162
- * @default "fingerprint"
166
+ * @default "appVersion"
163
167
  */
164
168
  updateStrategy: "fingerprint" | "appVersion";
165
169
  /**
@@ -362,7 +366,7 @@ declare const createBlobDatabasePlugin: <TContext = object>({
362
366
  }) => (options: BasePluginArgs) => DatabasePlugin;
363
367
  //#endregion
364
368
  //#region src/ConfigBuilder.d.ts
365
- type BuildType = "bare" | "rnef" | "expo";
369
+ type BuildType = "bare" | "rock" | "expo";
366
370
  type ImportInfo = {
367
371
  pkg: string;
368
372
  named?: string[];
@@ -374,7 +378,7 @@ type ProviderConfig = {
374
378
  configString: string;
375
379
  };
376
380
  interface IConfigBuilder {
377
- /** Sets the build type ('bare' or 'rnef' or 'expo') and adds necessary build imports. */
381
+ /** Sets the build type ('bare' or 'rock' or 'expo') and adds necessary build imports. */
378
382
  setBuildType(buildType: BuildType): this;
379
383
  /** Sets the storage configuration and adds its required imports. */
380
384
  setStorage(storageConfig: ProviderConfig): this;
package/dist/index.d.ts CHANGED
@@ -88,7 +88,8 @@ interface PlatformConfig {
88
88
  /**
89
89
  * Android string resource paths.
90
90
  *
91
- * @default ["android/app/src/main/res/values/strings.xml"]
91
+ * @default all strings.xml files in the android directory
92
+ * @example ["android/app/src/main/res/values/strings.xml"]
92
93
  */
93
94
  stringResourcePaths?: string[];
94
95
  };
@@ -99,7 +100,8 @@ interface PlatformConfig {
99
100
  /**
100
101
  * iOS info.plist paths.
101
102
  *
102
- * @default ["ios/\*\/Info.plist"]
103
+ * @default all Info.plist files in the ios directory
104
+ * @example ["ios/HotUpdaterExample/Info.plist"]
103
105
  */
104
106
  infoPlistPaths?: string[];
105
107
  };
@@ -157,9 +159,11 @@ type ConfigInput = {
157
159
  * The strategy used to update the app.
158
160
  *
159
161
  * If `fingerprint`, the bundle will be updated if the fingerprint of the app is changed.
160
- * If `app-version`, the bundle will be updated if the target app version is valid.
162
+ * @docs https://hot-updater.dev/guide/update-strategy/1_fingerprint
163
+ * If `appVersion`, the bundle will be updated if the target app version is valid.
164
+ * @docs https://hot-updater.dev/guide/update-strategy/2_app-version
161
165
  *
162
- * @default "fingerprint"
166
+ * @default "appVersion"
163
167
  */
164
168
  updateStrategy: "fingerprint" | "appVersion";
165
169
  /**
@@ -362,7 +366,7 @@ declare const createBlobDatabasePlugin: <TContext = object>({
362
366
  }) => (options: BasePluginArgs) => DatabasePlugin;
363
367
  //#endregion
364
368
  //#region src/ConfigBuilder.d.ts
365
- type BuildType = "bare" | "rnef" | "expo";
369
+ type BuildType = "bare" | "rock" | "expo";
366
370
  type ImportInfo = {
367
371
  pkg: string;
368
372
  named?: string[];
@@ -374,7 +378,7 @@ type ProviderConfig = {
374
378
  configString: string;
375
379
  };
376
380
  interface IConfigBuilder {
377
- /** Sets the build type ('bare' or 'rnef' or 'expo') and adds necessary build imports. */
381
+ /** Sets the build type ('bare' or 'rock' or 'expo') and adds necessary build imports. */
378
382
  setBuildType(buildType: BuildType): this;
379
383
  /** Sets the storage configuration and adds its required imports. */
380
384
  setStorage(storageConfig: ProviderConfig): this;
package/dist/index.js CHANGED
@@ -16364,28 +16364,47 @@ function merge(target, source) {
16364
16364
 
16365
16365
  //#endregion
16366
16366
  //#region src/loadConfig.ts
16367
- const getDefaultConfig = () => {
16367
+ const getDefaultPlatformConfig = () => {
16368
16368
  let infoPlistPaths = [];
16369
16369
  try {
16370
- const plistFiles = fg.sync("*/Info.plist", {
16370
+ const plistFiles = fg.sync("**/Info.plist", {
16371
16371
  cwd: path.join(getCwd(), "ios"),
16372
16372
  absolute: false,
16373
- onlyFiles: true
16373
+ onlyFiles: true,
16374
+ ignore: [
16375
+ "**/Pods/**",
16376
+ "**/build/**",
16377
+ "**/Build/**",
16378
+ "**/*.app/**",
16379
+ "**/*.xcarchive/**"
16380
+ ]
16374
16381
  });
16375
16382
  if (plistFiles.length > 0) infoPlistPaths = plistFiles.map((file) => `ios/${file}`);
16376
16383
  } catch (error) {}
16384
+ let stringResourcePaths = [];
16385
+ try {
16386
+ const stringsFiles = fg.sync(path.join("**", "strings.xml"), {
16387
+ cwd: path.join(getCwd(), "android"),
16388
+ absolute: false,
16389
+ onlyFiles: true
16390
+ });
16391
+ if (stringsFiles.length > 0) stringResourcePaths = stringsFiles.map((file) => path.join("android", file));
16392
+ } catch (error) {}
16393
+ return {
16394
+ android: { stringResourcePaths },
16395
+ ios: { infoPlistPaths }
16396
+ };
16397
+ };
16398
+ const getDefaultConfig = () => {
16377
16399
  return {
16378
16400
  releaseChannel: "production",
16379
- updateStrategy: "fingerprint",
16401
+ updateStrategy: "appVersion",
16380
16402
  fingerprint: {
16381
16403
  extraSources: [],
16382
16404
  ignorePaths: []
16383
16405
  },
16384
16406
  console: { port: 1422 },
16385
- platform: {
16386
- android: { stringResourcePaths: ["android/app/src/main/res/values/strings.xml"] },
16387
- ios: { infoPlistPaths }
16388
- },
16407
+ platform: getDefaultPlatformConfig(),
16389
16408
  nativeBuild: { android: {
16390
16409
  aab: true,
16391
16410
  variant: "Release",
@@ -16786,7 +16805,6 @@ function assembleStyles$1() {
16786
16805
  return styles$2;
16787
16806
  }
16788
16807
  const ansiStyles$1 = assembleStyles$1();
16789
- var ansi_styles_default$1 = ansiStyles$1;
16790
16808
 
16791
16809
  //#endregion
16792
16810
  //#region ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js
@@ -16875,7 +16893,6 @@ const supportsColor = {
16875
16893
  stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
16876
16894
  stderr: createSupportsColor({ isTTY: tty.isatty(2) })
16877
16895
  };
16878
- var supports_color_default = supportsColor;
16879
16896
 
16880
16897
  //#endregion
16881
16898
  //#region ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/utilities.js
@@ -16908,7 +16925,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
16908
16925
 
16909
16926
  //#endregion
16910
16927
  //#region ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/index.js
16911
- const { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
16928
+ const { stdout: stdoutColor, stderr: stderrColor } = supportsColor;
16912
16929
  const GENERATOR = Symbol("GENERATOR");
16913
16930
  const STYLER = Symbol("STYLER");
16914
16931
  const IS_EMPTY = Symbol("IS_EMPTY");
@@ -16934,7 +16951,7 @@ function createChalk(options) {
16934
16951
  return chalkFactory(options);
16935
16952
  }
16936
16953
  Object.setPrototypeOf(createChalk.prototype, Function.prototype);
16937
- for (const [styleName, style] of Object.entries(ansi_styles_default$1)) styles$1[styleName] = { get() {
16954
+ for (const [styleName, style] of Object.entries(ansiStyles$1)) styles$1[styleName] = { get() {
16938
16955
  const builder$1 = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
16939
16956
  Object.defineProperty(this, styleName, { value: builder$1 });
16940
16957
  return builder$1;
@@ -16946,12 +16963,12 @@ styles$1.visible = { get() {
16946
16963
  } };
16947
16964
  const getModelAnsi = (model, level, type, ...arguments_) => {
16948
16965
  if (model === "rgb") {
16949
- if (level === "ansi16m") return ansi_styles_default$1[type].ansi16m(...arguments_);
16950
- if (level === "ansi256") return ansi_styles_default$1[type].ansi256(ansi_styles_default$1.rgbToAnsi256(...arguments_));
16951
- return ansi_styles_default$1[type].ansi(ansi_styles_default$1.rgbToAnsi(...arguments_));
16966
+ if (level === "ansi16m") return ansiStyles$1[type].ansi16m(...arguments_);
16967
+ if (level === "ansi256") return ansiStyles$1[type].ansi256(ansiStyles$1.rgbToAnsi256(...arguments_));
16968
+ return ansiStyles$1[type].ansi(ansiStyles$1.rgbToAnsi(...arguments_));
16952
16969
  }
16953
- if (model === "hex") return getModelAnsi("rgb", level, type, ...ansi_styles_default$1.hexToRgb(...arguments_));
16954
- return ansi_styles_default$1[type][model](...arguments_);
16970
+ if (model === "hex") return getModelAnsi("rgb", level, type, ...ansiStyles$1.hexToRgb(...arguments_));
16971
+ return ansiStyles$1[type][model](...arguments_);
16955
16972
  };
16956
16973
  const usedModels = [
16957
16974
  "rgb",
@@ -16962,7 +16979,7 @@ for (const model of usedModels) {
16962
16979
  styles$1[model] = { get() {
16963
16980
  const { level } = this;
16964
16981
  return function(...arguments_) {
16965
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default$1.color.close, this[STYLER]);
16982
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansiStyles$1.color.close, this[STYLER]);
16966
16983
  return createBuilder(this, styler, this[IS_EMPTY]);
16967
16984
  };
16968
16985
  } };
@@ -16970,7 +16987,7 @@ for (const model of usedModels) {
16970
16987
  styles$1[bgModel] = { get() {
16971
16988
  const { level } = this;
16972
16989
  return function(...arguments_) {
16973
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default$1.bgColor.close, this[STYLER]);
16990
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansiStyles$1.bgColor.close, this[STYLER]);
16974
16991
  return createBuilder(this, styler, this[IS_EMPTY]);
16975
16992
  };
16976
16993
  } };
@@ -17029,7 +17046,6 @@ const applyStyle = (self$1, string) => {
17029
17046
  Object.defineProperties(createChalk.prototype, styles$1);
17030
17047
  const chalk = createChalk();
17031
17048
  const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
17032
- var source_default = chalk;
17033
17049
 
17034
17050
  //#endregion
17035
17051
  //#region ../../node_modules/.pnpm/widest-line@5.0.0/node_modules/widest-line/index.js
@@ -17481,7 +17497,6 @@ function assembleStyles() {
17481
17497
  return styles;
17482
17498
  }
17483
17499
  const ansiStyles = assembleStyles();
17484
- var ansi_styles_default = ansiStyles;
17485
17500
 
17486
17501
  //#endregion
17487
17502
  //#region ../../node_modules/.pnpm/wrap-ansi@9.0.0/node_modules/wrap-ansi/index.js
@@ -17593,7 +17608,7 @@ const exec = (string, columns, options = {}) => {
17593
17608
  escapeCode = code$1 === END_CODE ? void 0 : code$1;
17594
17609
  } else if (groups.uri !== void 0) escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
17595
17610
  }
17596
- const code = ansi_styles_default.codes.get(Number(escapeCode));
17611
+ const code = ansiStyles.codes.get(Number(escapeCode));
17597
17612
  if (pre[index + 1] === "\n") {
17598
17613
  if (escapeUrl) returnValue += wrapAnsiHyperlink("");
17599
17614
  if (escapeCode && code) returnValue += wrapAnsiCode(code);
@@ -17738,7 +17753,7 @@ const makeContentText = (text, { padding, width, textAlignment, height }) => {
17738
17753
  const boxContent = (content, contentWidth, options) => {
17739
17754
  const colorizeBorder = (border) => {
17740
17755
  const newBorder = options.borderColor ? getColorFunction(options.borderColor)(border) : border;
17741
- return options.dimBorder ? source_default.dim(newBorder) : newBorder;
17756
+ return options.dimBorder ? chalk.dim(newBorder) : newBorder;
17742
17757
  };
17743
17758
  const colorizeContent = (content$1) => options.backgroundColor ? getBGColorFunction(options.backgroundColor)(content$1) : content$1;
17744
17759
  const chars = getBorderChars(options.borderStyle);
@@ -17813,9 +17828,9 @@ const determineDimensions = (text, options) => {
17813
17828
  return options;
17814
17829
  };
17815
17830
  const isHex = (color) => color.match(/^#(?:[0-f]{3}){1,2}$/i);
17816
- const isColorValid = (color) => typeof color === "string" && (source_default[color] ?? isHex(color));
17817
- const getColorFunction = (color) => isHex(color) ? source_default.hex(color) : source_default[color];
17818
- const getBGColorFunction = (color) => isHex(color) ? source_default.bgHex(color) : source_default[camelCase(["bg", color])];
17831
+ const isColorValid = (color) => typeof color === "string" && (chalk[color] ?? isHex(color));
17832
+ const getColorFunction = (color) => isHex(color) ? chalk.hex(color) : chalk[color];
17833
+ const getBGColorFunction = (color) => isHex(color) ? chalk.bgHex(color) : chalk[camelCase(["bg", color])];
17819
17834
  function boxen(text, options) {
17820
17835
  options = {
17821
17836
  padding: 0,
@@ -27141,7 +27156,7 @@ var ConfigBuilder = class {
27141
27156
  if (!this.buildType) throw new Error("Build type must be set using .setBuildType()");
27142
27157
  switch (this.buildType) {
27143
27158
  case "bare": return "bare({ enableHermes: true })";
27144
- case "rnef": return "rnef()";
27159
+ case "rock": return "rock()";
27145
27160
  case "expo": return "expo()";
27146
27161
  default: throw new Error(`Invalid build type: ${this.buildType}`);
27147
27162
  }
@@ -27193,7 +27208,7 @@ export default defineConfig({
27193
27208
  build: ${buildConfigString},
27194
27209
  storage: ${this.storageInfo.configString},
27195
27210
  database: ${this.databaseInfo.configString},
27196
- updateStrategy: "fingerprint",
27211
+ updateStrategy: "appVersion", // or "fingerprint"
27197
27212
  });
27198
27213
  `.trim();
27199
27214
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/plugin-core",
3
- "version": "0.20.2",
3
+ "version": "0.20.4",
4
4
  "type": "module",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "sideEffects": false,
@@ -46,7 +46,7 @@
46
46
  "cosmiconfig-typescript-loader": "5.0.0",
47
47
  "fast-glob": "3.3.3",
48
48
  "oxc-transform": "0.82.1",
49
- "@hot-updater/core": "0.20.2"
49
+ "@hot-updater/core": "0.20.4"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "^22.7.5",
@@ -56,7 +56,7 @@
56
56
  "picocolors": "^1.0.0",
57
57
  "typescript": "5.8.2",
58
58
  "workspace-tools": "^0.36.4",
59
- "@hot-updater/plugin-core": "0.20.2"
59
+ "@hot-updater/plugin-core": "0.20.4"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "tsdown",