@hot-updater/bare 0.29.0 → 0.29.1

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
@@ -6317,7 +6317,7 @@ async function compileHermes({ cwd, sourcemap, inputJsFile }) {
6317
6317
  }
6318
6318
  //#endregion
6319
6319
  //#region src/bare.ts
6320
- const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enableHermes }) => {
6320
+ const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enableHermes, resetCache }) => {
6321
6321
  const reactNativePath = require.resolve("react-native/package.json", { paths: [cwd] });
6322
6322
  const cliPath = path.default.join(path.default.dirname(reactNativePath), "cli.js");
6323
6323
  const filename = `index.${platform}`;
@@ -6338,7 +6338,7 @@ const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enabl
6338
6338
  "--minify",
6339
6339
  String(!enableHermes),
6340
6340
  ...sourcemap ? ["--sourcemap-output", `${bundleOutput}.map`] : [],
6341
- "--reset-cache"
6341
+ ...resetCache ? ["--reset-cache"] : []
6342
6342
  ];
6343
6343
  _hot_updater_cli_tools.log.normal("\n");
6344
6344
  try {
@@ -6366,7 +6366,7 @@ const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enabl
6366
6366
  };
6367
6367
  };
6368
6368
  const bare = (config) => ({ cwd }) => {
6369
- const { outDir = "dist", sourcemap = false, entryFile = "index.js", enableHermes } = config;
6369
+ const { outDir = "dist", sourcemap = false, entryFile = "index.js", enableHermes, resetCache = true } = config;
6370
6370
  return {
6371
6371
  build: async ({ platform }) => {
6372
6372
  const buildPath = path.default.join(cwd, outDir);
@@ -6381,7 +6381,8 @@ const bare = (config) => ({ cwd }) => {
6381
6381
  platform,
6382
6382
  buildPath,
6383
6383
  sourcemap,
6384
- enableHermes
6384
+ enableHermes,
6385
+ resetCache
6385
6386
  });
6386
6387
  return {
6387
6388
  buildPath,
package/dist/index.d.cts CHANGED
@@ -19,6 +19,11 @@ interface BarePluginConfig extends BuildPluginConfig {
19
19
  * @recommended true
20
20
  */
21
21
  enableHermes: boolean;
22
+ /**
23
+ * @default true
24
+ * Whether to reset the Metro cache before bundling.
25
+ */
26
+ resetCache?: boolean;
22
27
  }
23
28
  declare const bare: (config: BarePluginConfig) => ({
24
29
  cwd
package/dist/index.d.mts CHANGED
@@ -19,6 +19,11 @@ interface BarePluginConfig extends BuildPluginConfig {
19
19
  * @recommended true
20
20
  */
21
21
  enableHermes: boolean;
22
+ /**
23
+ * @default true
24
+ * Whether to reset the Metro cache before bundling.
25
+ */
26
+ resetCache?: boolean;
22
27
  }
23
28
  declare const bare: (config: BarePluginConfig) => ({
24
29
  cwd
package/dist/index.mjs CHANGED
@@ -6312,7 +6312,7 @@ async function compileHermes({ cwd, sourcemap, inputJsFile }) {
6312
6312
  }
6313
6313
  //#endregion
6314
6314
  //#region src/bare.ts
6315
- const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enableHermes }) => {
6315
+ const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enableHermes, resetCache }) => {
6316
6316
  const reactNativePath = __require.resolve("react-native/package.json", { paths: [cwd] });
6317
6317
  const cliPath = path$1.join(path$1.dirname(reactNativePath), "cli.js");
6318
6318
  const filename = `index.${platform}`;
@@ -6333,7 +6333,7 @@ const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enabl
6333
6333
  "--minify",
6334
6334
  String(!enableHermes),
6335
6335
  ...sourcemap ? ["--sourcemap-output", `${bundleOutput}.map`] : [],
6336
- "--reset-cache"
6336
+ ...resetCache ? ["--reset-cache"] : []
6337
6337
  ];
6338
6338
  log.normal("\n");
6339
6339
  try {
@@ -6361,7 +6361,7 @@ const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enabl
6361
6361
  };
6362
6362
  };
6363
6363
  const bare = (config) => ({ cwd }) => {
6364
- const { outDir = "dist", sourcemap = false, entryFile = "index.js", enableHermes } = config;
6364
+ const { outDir = "dist", sourcemap = false, entryFile = "index.js", enableHermes, resetCache = true } = config;
6365
6365
  return {
6366
6366
  build: async ({ platform }) => {
6367
6367
  const buildPath = path$1.join(cwd, outDir);
@@ -6376,7 +6376,8 @@ const bare = (config) => ({ cwd }) => {
6376
6376
  platform,
6377
6377
  buildPath,
6378
6378
  sourcemap,
6379
- enableHermes
6379
+ enableHermes,
6380
+ resetCache
6380
6381
  });
6381
6382
  return {
6382
6383
  buildPath,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/bare",
3
3
  "type": "module",
4
- "version": "0.29.0",
4
+ "version": "0.29.1",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.mjs",
@@ -22,8 +22,8 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "uuidv7": "^1.0.2",
25
- "@hot-updater/plugin-core": "0.29.0",
26
- "@hot-updater/cli-tools": "0.29.0"
25
+ "@hot-updater/cli-tools": "0.29.1",
26
+ "@hot-updater/plugin-core": "0.29.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^20",