@hot-updater/plugin-core 0.19.2 → 0.19.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
@@ -29520,6 +29520,20 @@ const createBlobDatabasePlugin = ({ name, getContext, listObjects, loadObject, u
29520
29520
  changedBundlesByKey[newKey].push(removeBundleInternalKeys(updatedBundle$1));
29521
29521
  pathsToInvalidate.add(`/${oldKey}`);
29522
29522
  pathsToInvalidate.add(`/${newKey}`);
29523
+ const oldChannel = bundle.channel;
29524
+ const newChannel$1 = data.channel;
29525
+ if (oldChannel !== newChannel$1) {
29526
+ pathsToInvalidate.add(`/${oldChannel}/${bundle.platform}/target-app-versions.json`);
29527
+ pathsToInvalidate.add(`/${newChannel$1}/${bundle.platform}/target-app-versions.json`);
29528
+ if (bundle.fingerprintHash) {
29529
+ pathsToInvalidate.add(`${apiBasePath}/fingerprint/${bundle.platform}/${bundle.fingerprintHash}/${oldChannel}/*`);
29530
+ pathsToInvalidate.add(`${apiBasePath}/fingerprint/${bundle.platform}/${bundle.fingerprintHash}/${newChannel$1}/*`);
29531
+ }
29532
+ if (bundle.targetAppVersion) {
29533
+ pathsToInvalidate.add(`${apiBasePath}/app-version/${bundle.platform}/${bundle.targetAppVersion}/${oldChannel}/*`);
29534
+ pathsToInvalidate.add(`${apiBasePath}/app-version/${bundle.platform}/${bundle.targetAppVersion}/${newChannel$1}/*`);
29535
+ }
29536
+ }
29523
29537
  if (bundle.fingerprintHash) pathsToInvalidate.add(`${apiBasePath}/fingerprint/${bundle.platform}/${bundle.fingerprintHash}/${bundle.channel}/*`);
29524
29538
  else if (bundle.targetAppVersion) pathsToInvalidate.add(`${apiBasePath}/app-version/${bundle.platform}/${bundle.targetAppVersion}/${bundle.channel}/*`);
29525
29539
  continue;
package/dist/index.d.cts CHANGED
@@ -94,8 +94,18 @@ type ConfigInput = {
94
94
  * The fingerprint configuration.
95
95
  */
96
96
  fingerprint?: {
97
+ /**
98
+ * The extra sources to be included in the fingerprint.
99
+ */
97
100
  extraSources?: string[];
101
+ /**
102
+ * The paths to be ignored in the fingerprint.
103
+ */
98
104
  ignorePaths?: string[];
105
+ /**
106
+ * When debug mode is enabled, more detailed information will be exposed in fingerprint.json.
107
+ */
108
+ debug?: boolean;
99
109
  };
100
110
  console?: {
101
111
  /**
package/dist/index.d.ts CHANGED
@@ -94,8 +94,18 @@ type ConfigInput = {
94
94
  * The fingerprint configuration.
95
95
  */
96
96
  fingerprint?: {
97
+ /**
98
+ * The extra sources to be included in the fingerprint.
99
+ */
97
100
  extraSources?: string[];
101
+ /**
102
+ * The paths to be ignored in the fingerprint.
103
+ */
98
104
  ignorePaths?: string[];
105
+ /**
106
+ * When debug mode is enabled, more detailed information will be exposed in fingerprint.json.
107
+ */
108
+ debug?: boolean;
99
109
  };
100
110
  console?: {
101
111
  /**
package/dist/index.js CHANGED
@@ -29522,6 +29522,20 @@ const createBlobDatabasePlugin = ({ name, getContext, listObjects, loadObject, u
29522
29522
  changedBundlesByKey[newKey].push(removeBundleInternalKeys(updatedBundle$1));
29523
29523
  pathsToInvalidate.add(`/${oldKey}`);
29524
29524
  pathsToInvalidate.add(`/${newKey}`);
29525
+ const oldChannel = bundle.channel;
29526
+ const newChannel$1 = data.channel;
29527
+ if (oldChannel !== newChannel$1) {
29528
+ pathsToInvalidate.add(`/${oldChannel}/${bundle.platform}/target-app-versions.json`);
29529
+ pathsToInvalidate.add(`/${newChannel$1}/${bundle.platform}/target-app-versions.json`);
29530
+ if (bundle.fingerprintHash) {
29531
+ pathsToInvalidate.add(`${apiBasePath}/fingerprint/${bundle.platform}/${bundle.fingerprintHash}/${oldChannel}/*`);
29532
+ pathsToInvalidate.add(`${apiBasePath}/fingerprint/${bundle.platform}/${bundle.fingerprintHash}/${newChannel$1}/*`);
29533
+ }
29534
+ if (bundle.targetAppVersion) {
29535
+ pathsToInvalidate.add(`${apiBasePath}/app-version/${bundle.platform}/${bundle.targetAppVersion}/${oldChannel}/*`);
29536
+ pathsToInvalidate.add(`${apiBasePath}/app-version/${bundle.platform}/${bundle.targetAppVersion}/${newChannel$1}/*`);
29537
+ }
29538
+ }
29525
29539
  if (bundle.fingerprintHash) pathsToInvalidate.add(`${apiBasePath}/fingerprint/${bundle.platform}/${bundle.fingerprintHash}/${bundle.channel}/*`);
29526
29540
  else if (bundle.targetAppVersion) pathsToInvalidate.add(`${apiBasePath}/app-version/${bundle.platform}/${bundle.targetAppVersion}/${bundle.channel}/*`);
29527
29541
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/plugin-core",
3
- "version": "0.19.2",
3
+ "version": "0.19.4",
4
4
  "type": "module",
5
5
  "description": "React Native OTA solution for self-hosted",
6
6
  "sideEffects": false,
@@ -45,7 +45,7 @@
45
45
  "cosmiconfig": "9.0.0",
46
46
  "cosmiconfig-typescript-loader": "5.0.0",
47
47
  "oxc-transform": "0.72.0",
48
- "@hot-updater/core": "0.19.2"
48
+ "@hot-updater/core": "0.19.4"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^22.7.5",
@@ -55,7 +55,7 @@
55
55
  "picocolors": "^1.0.0",
56
56
  "typescript": "5.8.2",
57
57
  "workspace-tools": "^0.36.4",
58
- "@hot-updater/plugin-core": "0.19.2"
58
+ "@hot-updater/plugin-core": "0.19.4"
59
59
  },
60
60
  "scripts": {
61
61
  "build": "tsdown",