hot-updater 0.20.7 → 0.20.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/config.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  require('./picocolors-y8lGs7d-.cjs');
2
- const require_fingerprint = require('./fingerprint-Cgwd8mei.cjs');
2
+ const require_fingerprint = require('./fingerprint-JbEkGyct.cjs');
3
3
 
4
4
  //#region src/config.ts
5
5
  const defineConfig = (config) => {
package/dist/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./picocolors-BnzanxXs.js";
2
- import { createAndInjectFingerprintFiles, generateFingerprint, generateFingerprints, readLocalFingerprint } from "./fingerprint--hj1gaV4.js";
2
+ import { createAndInjectFingerprintFiles, generateFingerprint, generateFingerprints, readLocalFingerprint } from "./fingerprint-CYOTKhNO.js";
3
3
 
4
4
  //#region src/config.ts
5
5
  const defineConfig = (config) => {
@@ -14858,15 +14858,14 @@ var import_out = /* @__PURE__ */ __toESM(require_out(), 1);
14858
14858
  * Processes extra source files and directories for fingerprinting.
14859
14859
  * @param extraSources Array of file paths, directory paths, or glob patterns
14860
14860
  * @param cwd Current working directory for resolving paths
14861
- * @param ignorePaths Optional array of paths to ignore
14862
14861
  * @returns Array of processed sources with their contents or directory information
14863
14862
  */
14864
- function processExtraSources(extraSources, cwd, ignorePaths) {
14863
+ function processExtraSources(extraSources, cwd) {
14865
14864
  const processedSources = [];
14866
14865
  for (const source of extraSources) try {
14867
14866
  const matches = import_out.default.globSync(source, {
14868
14867
  cwd,
14869
- ignore: ignorePaths ?? [],
14868
+ ignore: [],
14870
14869
  absolute: true,
14871
14870
  onlyFiles: false
14872
14871
  });
@@ -14900,17 +14899,60 @@ const ensureFingerprintConfig = async () => {
14900
14899
  }
14901
14900
  return config.fingerprint;
14902
14901
  };
14903
- function getFingerprintOptions(platform, path$11, options) {
14902
+ /**
14903
+ * Utility function that takes an array of extensions and generates glob patterns to allow those extensions.
14904
+ * @param extensions Array of allowed extensions (e.g., ["*.swift", "*.kt", "*.java"])
14905
+ * @returns Array of glob patterns
14906
+ */
14907
+ function allowExtensions(extensions) {
14908
+ return extensions.map((ext) => `!**/${ext}`);
14909
+ }
14910
+ /**
14911
+ * Utility function that returns the default ignore paths.
14912
+ * @returns Array of default ignore paths
14913
+ */
14914
+ function getDefaultIgnorePaths() {
14915
+ return [
14916
+ "**/*",
14917
+ "**/.build/**/*",
14918
+ "**/build/"
14919
+ ];
14920
+ }
14921
+ function getOtaFingerprintOptions(platform, path$11, options) {
14904
14922
  return {
14905
14923
  platforms: [platform],
14906
- ignorePaths: [
14907
- "**/android/**/strings.xml",
14908
- "**/ios/**/*.plist",
14909
- "**/.gitignore",
14910
- ...options.ignorePaths
14911
- ],
14912
- sourceSkips: SourceSkips.GitIgnore | SourceSkips.PackageJsonScriptsAll,
14913
- extraSources: processExtraSources(options.extraSources, path$11, options.ignorePaths),
14924
+ ignorePaths: [...getDefaultIgnorePaths(), ...allowExtensions([
14925
+ "*.swift",
14926
+ "*.h",
14927
+ "*.m",
14928
+ "*.mm",
14929
+ "*.kt",
14930
+ "*.java",
14931
+ "*.cpp",
14932
+ "*.hpp",
14933
+ "*.c",
14934
+ "*.cc",
14935
+ "*.cxx",
14936
+ "*.podspec",
14937
+ "*.gradle",
14938
+ "*.kts",
14939
+ "CMakeLists.txt",
14940
+ "Android.mk",
14941
+ "Application.mk",
14942
+ "*.pro",
14943
+ "*.mk",
14944
+ "*.cmake",
14945
+ "*.ninja",
14946
+ "Makefile",
14947
+ "*.bazel",
14948
+ "*.buck",
14949
+ "BUILD",
14950
+ "WORKSPACE",
14951
+ "BUILD.bazel",
14952
+ "WORKSPACE.bazel"
14953
+ ])],
14954
+ sourceSkips: SourceSkips.GitIgnore | SourceSkips.PackageJsonScriptsAll | SourceSkips.PackageJsonAndroidAndIosScriptsIfNotContainRun | SourceSkips.ExpoConfigAll | SourceSkips.ExpoConfigVersions | SourceSkips.ExpoConfigNames | SourceSkips.ExpoConfigRuntimeVersionIfString | SourceSkips.ExpoConfigAssets | SourceSkips.ExpoConfigExtraSection | SourceSkips.ExpoConfigEASProject | SourceSkips.ExpoConfigSchemes,
14955
+ extraSources: processExtraSources(options.extraSources ?? [], path$11),
14914
14956
  debug: options.debug
14915
14957
  };
14916
14958
  }
@@ -14929,7 +14971,7 @@ function isFingerprintEquals(lhs, rhs) {
14929
14971
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
14930
14972
  async function getFingerprintDiff(oldFingerprint, options) {
14931
14973
  const projectPath = getCwd();
14932
- return await diffFingerprintChangesAsync(oldFingerprint, projectPath, getFingerprintOptions(options.platform, projectPath, options));
14974
+ return await diffFingerprintChangesAsync(oldFingerprint, projectPath, getOtaFingerprintOptions(options.platform, projectPath, options));
14933
14975
  }
14934
14976
  function getSourcePath(source) {
14935
14977
  if (source.type === "file" || source.type === "dir") return source.filePath;
@@ -14953,7 +14995,7 @@ function showFingerprintDiff(diff, platform) {
14953
14995
  */
14954
14996
  async function nativeFingerprint(path$11, options) {
14955
14997
  const platform = options.platform;
14956
- return createFingerprintAsync(path$11, getFingerprintOptions(platform, path$11, options));
14998
+ return createFingerprintAsync(path$11, getOtaFingerprintOptions(platform, path$11, options));
14957
14999
  }
14958
15000
  const generateFingerprints = async () => {
14959
15001
  const fingerprintConfig = await ensureFingerprintConfig();
@@ -14858,15 +14858,14 @@ var import_out = /* @__PURE__ */ require_picocolors$1.__toESM(require_out(), 1);
14858
14858
  * Processes extra source files and directories for fingerprinting.
14859
14859
  * @param extraSources Array of file paths, directory paths, or glob patterns
14860
14860
  * @param cwd Current working directory for resolving paths
14861
- * @param ignorePaths Optional array of paths to ignore
14862
14861
  * @returns Array of processed sources with their contents or directory information
14863
14862
  */
14864
- function processExtraSources(extraSources, cwd, ignorePaths) {
14863
+ function processExtraSources(extraSources, cwd) {
14865
14864
  const processedSources = [];
14866
14865
  for (const source of extraSources) try {
14867
14866
  const matches = import_out.default.globSync(source, {
14868
14867
  cwd,
14869
- ignore: ignorePaths ?? [],
14868
+ ignore: [],
14870
14869
  absolute: true,
14871
14870
  onlyFiles: false
14872
14871
  });
@@ -14900,17 +14899,60 @@ const ensureFingerprintConfig = async () => {
14900
14899
  }
14901
14900
  return config.fingerprint;
14902
14901
  };
14903
- function getFingerprintOptions(platform, path$14, options) {
14902
+ /**
14903
+ * Utility function that takes an array of extensions and generates glob patterns to allow those extensions.
14904
+ * @param extensions Array of allowed extensions (e.g., ["*.swift", "*.kt", "*.java"])
14905
+ * @returns Array of glob patterns
14906
+ */
14907
+ function allowExtensions(extensions) {
14908
+ return extensions.map((ext) => `!**/${ext}`);
14909
+ }
14910
+ /**
14911
+ * Utility function that returns the default ignore paths.
14912
+ * @returns Array of default ignore paths
14913
+ */
14914
+ function getDefaultIgnorePaths() {
14915
+ return [
14916
+ "**/*",
14917
+ "**/.build/**/*",
14918
+ "**/build/"
14919
+ ];
14920
+ }
14921
+ function getOtaFingerprintOptions(platform, path$14, options) {
14904
14922
  return {
14905
14923
  platforms: [platform],
14906
- ignorePaths: [
14907
- "**/android/**/strings.xml",
14908
- "**/ios/**/*.plist",
14909
- "**/.gitignore",
14910
- ...options.ignorePaths
14911
- ],
14912
- sourceSkips: __expo_fingerprint.SourceSkips.GitIgnore | __expo_fingerprint.SourceSkips.PackageJsonScriptsAll,
14913
- extraSources: processExtraSources(options.extraSources, path$14, options.ignorePaths),
14924
+ ignorePaths: [...getDefaultIgnorePaths(), ...allowExtensions([
14925
+ "*.swift",
14926
+ "*.h",
14927
+ "*.m",
14928
+ "*.mm",
14929
+ "*.kt",
14930
+ "*.java",
14931
+ "*.cpp",
14932
+ "*.hpp",
14933
+ "*.c",
14934
+ "*.cc",
14935
+ "*.cxx",
14936
+ "*.podspec",
14937
+ "*.gradle",
14938
+ "*.kts",
14939
+ "CMakeLists.txt",
14940
+ "Android.mk",
14941
+ "Application.mk",
14942
+ "*.pro",
14943
+ "*.mk",
14944
+ "*.cmake",
14945
+ "*.ninja",
14946
+ "Makefile",
14947
+ "*.bazel",
14948
+ "*.buck",
14949
+ "BUILD",
14950
+ "WORKSPACE",
14951
+ "BUILD.bazel",
14952
+ "WORKSPACE.bazel"
14953
+ ])],
14954
+ sourceSkips: __expo_fingerprint.SourceSkips.GitIgnore | __expo_fingerprint.SourceSkips.PackageJsonScriptsAll | __expo_fingerprint.SourceSkips.PackageJsonAndroidAndIosScriptsIfNotContainRun | __expo_fingerprint.SourceSkips.ExpoConfigAll | __expo_fingerprint.SourceSkips.ExpoConfigVersions | __expo_fingerprint.SourceSkips.ExpoConfigNames | __expo_fingerprint.SourceSkips.ExpoConfigRuntimeVersionIfString | __expo_fingerprint.SourceSkips.ExpoConfigAssets | __expo_fingerprint.SourceSkips.ExpoConfigExtraSection | __expo_fingerprint.SourceSkips.ExpoConfigEASProject | __expo_fingerprint.SourceSkips.ExpoConfigSchemes,
14955
+ extraSources: processExtraSources(options.extraSources ?? [], path$14),
14914
14956
  debug: options.debug
14915
14957
  };
14916
14958
  }
@@ -14929,7 +14971,7 @@ function isFingerprintEquals(lhs, rhs) {
14929
14971
  var import_picocolors = /* @__PURE__ */ require_picocolors$1.__toESM(require_picocolors$1.require_picocolors(), 1);
14930
14972
  async function getFingerprintDiff(oldFingerprint, options) {
14931
14973
  const projectPath = (0, __hot_updater_plugin_core.getCwd)();
14932
- return await (0, __expo_fingerprint.diffFingerprintChangesAsync)(oldFingerprint, projectPath, getFingerprintOptions(options.platform, projectPath, options));
14974
+ return await (0, __expo_fingerprint.diffFingerprintChangesAsync)(oldFingerprint, projectPath, getOtaFingerprintOptions(options.platform, projectPath, options));
14933
14975
  }
14934
14976
  function getSourcePath(source) {
14935
14977
  if (source.type === "file" || source.type === "dir") return source.filePath;
@@ -14953,7 +14995,7 @@ function showFingerprintDiff(diff, platform) {
14953
14995
  */
14954
14996
  async function nativeFingerprint(path$14, options) {
14955
14997
  const platform = options.platform;
14956
- return (0, __expo_fingerprint.createFingerprintAsync)(path$14, getFingerprintOptions(platform, path$14, options));
14998
+ return (0, __expo_fingerprint.createFingerprintAsync)(path$14, getOtaFingerprintOptions(platform, path$14, options));
14957
14999
  }
14958
15000
  const generateFingerprints = async () => {
14959
15001
  const fingerprintConfig = await ensureFingerprintConfig();
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  const require_picocolors$1 = require('./picocolors-y8lGs7d-.cjs');
3
- const require_fingerprint = require('./fingerprint-Cgwd8mei.cjs');
3
+ const require_fingerprint = require('./fingerprint-JbEkGyct.cjs');
4
4
  const node_events = require_picocolors$1.__toESM(require("node:events"));
5
5
  const node_child_process = require_picocolors$1.__toESM(require("node:child_process"));
6
6
  const node_path = require_picocolors$1.__toESM(require("node:path"));
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { __commonJS, __require, __toESM, require_picocolors } from "./picocolors-BnzanxXs.js";
3
- import { AndroidConfigParser, IosConfigParser, createAndInjectFingerprintFiles, generateFingerprints, getFingerprintDiff, isFingerprintEquals, nativeFingerprint, readLocalFingerprint, require_base64_js, require_out, require_plist, showFingerprintDiff } from "./fingerprint--hj1gaV4.js";
3
+ import { AndroidConfigParser, IosConfigParser, createAndInjectFingerprintFiles, generateFingerprints, getFingerprintDiff, isFingerprintEquals, nativeFingerprint, readLocalFingerprint, require_base64_js, require_out, require_plist, showFingerprintDiff } from "./fingerprint-CYOTKhNO.js";
4
4
  import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
5
5
  import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
6
6
  import path from "node:path";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hot-updater",
3
3
  "type": "module",
4
- "version": "0.20.7",
4
+ "version": "0.20.8",
5
5
  "bin": {
6
6
  "hot-updater": "./dist/index.js"
7
7
  },
@@ -53,9 +53,9 @@
53
53
  "cosmiconfig": "9.0.0",
54
54
  "cosmiconfig-typescript-loader": "5.0.0",
55
55
  "es-git": "0.4.0",
56
- "@hot-updater/console": "0.20.7",
57
- "@hot-updater/core": "0.20.7",
58
- "@hot-updater/plugin-core": "0.20.7"
56
+ "@hot-updater/console": "0.20.8",
57
+ "@hot-updater/core": "0.20.8",
58
+ "@hot-updater/plugin-core": "0.20.8"
59
59
  },
60
60
  "devDependencies": {
61
61
  "fast-xml-parser": "^5.2.3",
@@ -86,10 +86,10 @@
86
86
  "read-package-up": "^11.0.0",
87
87
  "semver": "^7.6.3",
88
88
  "uuidv7": "^1.0.2",
89
- "@hot-updater/aws": "0.20.7",
90
- "@hot-updater/cloudflare": "0.20.7",
91
- "@hot-updater/firebase": "0.20.7",
92
- "@hot-updater/supabase": "0.20.7"
89
+ "@hot-updater/aws": "0.20.8",
90
+ "@hot-updater/firebase": "0.20.8",
91
+ "@hot-updater/supabase": "0.20.8",
92
+ "@hot-updater/cloudflare": "0.20.8"
93
93
  },
94
94
  "peerDependencies": {
95
95
  "@hot-updater/aws": "*",