hot-updater 0.19.0 → 0.19.1-rc.0

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,4 +1,4 @@
1
- const require_fingerprint = require('./fingerprint-w8QPkdqq.cjs');
1
+ const require_fingerprint = require('./fingerprint-D6SRhiV0.cjs');
2
2
 
3
3
  //#region src/config.ts
4
4
  const defineConfig = (config) => {
package/dist/config.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createFingerprintJson, generateFingerprint, generateFingerprints, readLocalFingerprint } from "./fingerprint-m6lqnvbJ.js";
1
+ import { createFingerprintJson, generateFingerprint, generateFingerprints, readLocalFingerprint } from "./fingerprint-BW6n-GRF.js";
2
2
 
3
3
  //#region src/config.ts
4
4
  const defineConfig = (config) => {
@@ -45,19 +45,6 @@ function processExtraSources(extraSources, cwd, ignorePaths) {
45
45
 
46
46
  //#endregion
47
47
  //#region src/utils/fingerprint/index.ts
48
- function removeHotUpdaterFieldsFromStringsXml(contents) {
49
- return contents.replaceAll(/<string name="hot_updater_fingerprint_hash" moduleConfig="true">[^<]+<\/string>/g, "").replaceAll(/<string name="hot_updater_channel" moduleConfig="true">[^<]+<\/string>/g, "");
50
- }
51
- function removeHotUpdaterFieldsFromInfoPlist(contents) {
52
- return contents.replaceAll(/<key>HOT_UPDATER_FINGERPRINT_HASH<\/key>\s*<string>[^<]+<\/string>/g, "").replaceAll(/<key>HOT_UPDATER_CHANNEL<\/key>\s*<string>[^<]+<\/string>/g, "");
53
- }
54
- function fileHookTransform(source, chunk) {
55
- if (source.type !== "file" || !chunk) return chunk;
56
- const chunkString = chunk.toString("utf-8");
57
- if (source.filePath.endsWith(".xml")) return Buffer.from(removeHotUpdaterFieldsFromStringsXml(chunkString));
58
- if (source.filePath.endsWith(".plist")) return Buffer.from(removeHotUpdaterFieldsFromInfoPlist(chunkString));
59
- return chunk;
60
- }
61
48
  /**
62
49
  * Calculates the fingerprint of the native parts project of the project.
63
50
  */
@@ -65,8 +52,11 @@ async function nativeFingerprint(path$1, options) {
65
52
  const platform = options.platform;
66
53
  return createFingerprintAsync(path$1, {
67
54
  platforms: [platform],
68
- ignorePaths: options.ignorePaths,
69
- fileHookTransform,
55
+ ignorePaths: [
56
+ "**/android/**/strings.xml",
57
+ "**/ios/**/Info.plist",
58
+ ...options.ignorePaths
59
+ ],
70
60
  extraSources: processExtraSources(options.extraSources, path$1, options.ignorePaths)
71
61
  });
72
62
  }
@@ -46,19 +46,6 @@ function processExtraSources(extraSources, cwd, ignorePaths) {
46
46
 
47
47
  //#endregion
48
48
  //#region src/utils/fingerprint/index.ts
49
- function removeHotUpdaterFieldsFromStringsXml(contents) {
50
- return contents.replaceAll(/<string name="hot_updater_fingerprint_hash" moduleConfig="true">[^<]+<\/string>/g, "").replaceAll(/<string name="hot_updater_channel" moduleConfig="true">[^<]+<\/string>/g, "");
51
- }
52
- function removeHotUpdaterFieldsFromInfoPlist(contents) {
53
- return contents.replaceAll(/<key>HOT_UPDATER_FINGERPRINT_HASH<\/key>\s*<string>[^<]+<\/string>/g, "").replaceAll(/<key>HOT_UPDATER_CHANNEL<\/key>\s*<string>[^<]+<\/string>/g, "");
54
- }
55
- function fileHookTransform(source, chunk) {
56
- if (source.type !== "file" || !chunk) return chunk;
57
- const chunkString = chunk.toString("utf-8");
58
- if (source.filePath.endsWith(".xml")) return Buffer.from(removeHotUpdaterFieldsFromStringsXml(chunkString));
59
- if (source.filePath.endsWith(".plist")) return Buffer.from(removeHotUpdaterFieldsFromInfoPlist(chunkString));
60
- return chunk;
61
- }
62
49
  /**
63
50
  * Calculates the fingerprint of the native parts project of the project.
64
51
  */
@@ -66,8 +53,11 @@ async function nativeFingerprint(path$2, options) {
66
53
  const platform = options.platform;
67
54
  return (0, __expo_fingerprint.createFingerprintAsync)(path$2, {
68
55
  platforms: [platform],
69
- ignorePaths: options.ignorePaths,
70
- fileHookTransform,
56
+ ignorePaths: [
57
+ "**/android/**/strings.xml",
58
+ "**/ios/**/Info.plist",
59
+ ...options.ignorePaths
60
+ ],
71
61
  extraSources: processExtraSources(options.extraSources, path$2, options.ignorePaths)
72
62
  });
73
63
  }
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  const require_chunk = require('./chunk-DWy1uDak.cjs');
3
- const require_fingerprint = require('./fingerprint-w8QPkdqq.cjs');
3
+ const require_fingerprint = require('./fingerprint-D6SRhiV0.cjs');
4
4
  const require_picocolors$1 = require('./picocolors--H0eYra-.cjs');
5
5
  const http = require_chunk.__toESM(require("http"));
6
6
  const http2 = require_chunk.__toESM(require("http2"));
@@ -21972,8 +21972,8 @@ const handleCreateFingerprint = async () => {
21972
21972
  await __clack_prompts.tasks([{
21973
21973
  title: "Creating fingerprint.json",
21974
21974
  task: async () => {
21975
- const newFingerprint = await require_fingerprint.createFingerprintJson();
21976
21975
  const localFingerprint = await require_fingerprint.readLocalFingerprint();
21976
+ const newFingerprint = await require_fingerprint.createFingerprintJson();
21977
21977
  if (!localFingerprint || localFingerprint?.ios?.hash !== newFingerprint.ios.hash || localFingerprint?.android?.hash !== newFingerprint.android.hash) diffChanged = true;
21978
21978
  await setFingerprintHash("ios", newFingerprint.ios.hash);
21979
21979
  await setFingerprintHash("android", newFingerprint.android.hash);
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-OFVOrezl.js";
3
- import { createFingerprintJson, generateFingerprints, nativeFingerprint, readLocalFingerprint } from "./fingerprint-m6lqnvbJ.js";
3
+ import { createFingerprintJson, generateFingerprints, nativeFingerprint, readLocalFingerprint } from "./fingerprint-BW6n-GRF.js";
4
4
  import { createServer } from "http";
5
5
  import { Http2ServerRequest } from "http2";
6
6
  import { Readable } from "stream";
@@ -21984,8 +21984,8 @@ const handleCreateFingerprint = async () => {
21984
21984
  await p$1.tasks([{
21985
21985
  title: "Creating fingerprint.json",
21986
21986
  task: async () => {
21987
- const newFingerprint = await createFingerprintJson();
21988
21987
  const localFingerprint = await readLocalFingerprint();
21988
+ const newFingerprint = await createFingerprintJson();
21989
21989
  if (!localFingerprint || localFingerprint?.ios?.hash !== newFingerprint.ios.hash || localFingerprint?.android?.hash !== newFingerprint.android.hash) diffChanged = true;
21990
21990
  await setFingerprintHash("ios", newFingerprint.ios.hash);
21991
21991
  await setFingerprintHash("android", newFingerprint.android.hash);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hot-updater",
3
3
  "type": "module",
4
- "version": "0.19.0",
4
+ "version": "0.19.1-rc.0",
5
5
  "bin": {
6
6
  "hot-updater": "./dist/index.js"
7
7
  },
@@ -58,9 +58,9 @@
58
58
  "es-git": "^0.2.0",
59
59
  "fast-xml-parser": "^5.2.3",
60
60
  "globby": "^14.1.0",
61
- "@hot-updater/console": "0.19.0",
62
- "@hot-updater/plugin-core": "0.19.0",
63
- "@hot-updater/core": "0.19.0"
61
+ "@hot-updater/console": "0.19.1-rc.0",
62
+ "@hot-updater/plugin-core": "0.19.1-rc.0",
63
+ "@hot-updater/core": "0.19.1-rc.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@babel/core": "7.26.0",
@@ -86,16 +86,16 @@
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.19.0",
90
- "@hot-updater/cloudflare": "0.19.0",
91
- "@hot-updater/firebase": "0.19.0",
92
- "@hot-updater/supabase": "0.19.0"
89
+ "@hot-updater/cloudflare": "0.19.1-rc.0",
90
+ "@hot-updater/aws": "0.19.1-rc.0",
91
+ "@hot-updater/firebase": "0.19.1-rc.0",
92
+ "@hot-updater/supabase": "0.19.1-rc.0"
93
93
  },
94
94
  "peerDependencies": {
95
- "@hot-updater/aws": "*",
96
- "@hot-updater/cloudflare": "*",
97
- "@hot-updater/firebase": "*",
98
- "@hot-updater/supabase": "*"
95
+ "@hot-updater/aws": "0.19.1-rc.0",
96
+ "@hot-updater/cloudflare": "0.19.1-rc.0",
97
+ "@hot-updater/firebase": "0.19.1-rc.0",
98
+ "@hot-updater/supabase": "0.19.1-rc.0"
99
99
  },
100
100
  "peerDependenciesMeta": {
101
101
  "@hot-updater/supabase": {