@hot-updater/android-helper 1.2.0-rc.40 → 1.2.0-rc.41

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
@@ -598,8 +598,8 @@ const filterXml = ({ actions, categories, data, attributes }, extra = "") => [
598
598
  ].map((line) => ` ${line}`).join("\n");
599
599
  const optional = (name, value) => value === void 0 ? "" : ` android:${name}="${xml(value)}"`;
600
600
  /**
601
- * The manifest a sandbox build overlays on the app's. `tools:replace` wins over
602
- * a channel the app's manifest sets, as an Expo project's does. The launcher's
601
+ * The manifest a sandbox build overlays on the app's, which keeps the app's
602
+ * channel: a sandbox build embeds the project's, as any build does. The launcher's
603
603
  * filter, label, icon and static shortcuts move to the sandbox's activity, which
604
604
  * also takes the links of `urlScheme`, which its `<meta-data>` names for the
605
605
  * build to read; the rest of the app's activity stays, so its own links still
@@ -607,10 +607,9 @@ const optional = (name, value) => value === void 0 ? "" : ` android:${name}="${x
607
607
  * The dev server is plain http, which a project's network security config can
608
608
  * still refuse: the screen then says so.
609
609
  */
610
- const sandboxManifestOverlay = ({ channel, urlScheme, launcher }) => `<?xml version="1.0" encoding="utf-8"?>
610
+ const sandboxManifestOverlay = ({ urlScheme, launcher }) => `<?xml version="1.0" encoding="utf-8"?>
611
611
  <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
612
612
  <application android:usesCleartextTraffic="true" tools:replace="android:usesCleartextTraffic">
613
- <meta-data android:name="com.hotupdater.CHANNEL" android:value="${xml(channel)}" tools:replace="android:value" />
614
613
  <meta-data android:name="${_hot_updater_protocol_native_artifact.SANDBOX_META_DATA}" android:value="true" />
615
614
  <activity android:name="${_hot_updater_protocol_native_artifact.SANDBOX_ACTIVITY}" android:exported="true" android:launchMode="singleTop" android:theme="@style/HotUpdaterSandboxTheme" android:configChanges="density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:enableOnBackInvokedCallback="true"${optional("label", launcher.label)}${optional("icon", launcher.icon)}${optional("roundIcon", launcher.roundIcon)}>
616
615
  ${filterXml(launcher.filter)}
@@ -729,7 +728,6 @@ const withSandboxGradleArgs = async (scheme, readEffectiveManifest, build, { min
729
728
  const overlay = path.default.join(directory, "AndroidManifest.xml");
730
729
  const initScript = path.default.join(directory, "sandbox.init.gradle");
731
730
  await fs.default.promises.writeFile(overlay, sandboxManifestOverlay({
732
- channel: (0, _hot_updater_protocol_native_artifact.sandboxChannelOf)(scheme.hotUpdaterSchemeName),
733
731
  urlScheme,
734
732
  launcher
735
733
  }));
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { ExecaError, execa } from "execa";
5
5
  import os from "os";
6
6
  import JSZip from "jszip";
7
7
  import { createRequire } from "module";
8
- import { SANDBOX_ACTIVITY, SANDBOX_APPLICATION_ID_SUFFIX, SANDBOX_META_DATA, SANDBOX_URL_SCHEME_META_DATA, sandboxChannelOf, sandboxUrlSchemeOf } from "@hot-updater/protocol/native-artifact";
8
+ import { SANDBOX_ACTIVITY, SANDBOX_APPLICATION_ID_SUFFIX, SANDBOX_META_DATA, SANDBOX_URL_SCHEME_META_DATA, sandboxUrlSchemeOf } from "@hot-updater/protocol/native-artifact";
9
9
  import { XMLParser } from "fast-xml-parser";
10
10
  import crypto from "crypto";
11
11
  import { pipeline } from "stream/promises";
@@ -570,8 +570,8 @@ const filterXml = ({ actions, categories, data, attributes }, extra = "") => [
570
570
  ].map((line) => ` ${line}`).join("\n");
571
571
  const optional = (name, value) => value === void 0 ? "" : ` android:${name}="${xml(value)}"`;
572
572
  /**
573
- * The manifest a sandbox build overlays on the app's. `tools:replace` wins over
574
- * a channel the app's manifest sets, as an Expo project's does. The launcher's
573
+ * The manifest a sandbox build overlays on the app's, which keeps the app's
574
+ * channel: a sandbox build embeds the project's, as any build does. The launcher's
575
575
  * filter, label, icon and static shortcuts move to the sandbox's activity, which
576
576
  * also takes the links of `urlScheme`, which its `<meta-data>` names for the
577
577
  * build to read; the rest of the app's activity stays, so its own links still
@@ -579,10 +579,9 @@ const optional = (name, value) => value === void 0 ? "" : ` android:${name}="${x
579
579
  * The dev server is plain http, which a project's network security config can
580
580
  * still refuse: the screen then says so.
581
581
  */
582
- const sandboxManifestOverlay = ({ channel, urlScheme, launcher }) => `<?xml version="1.0" encoding="utf-8"?>
582
+ const sandboxManifestOverlay = ({ urlScheme, launcher }) => `<?xml version="1.0" encoding="utf-8"?>
583
583
  <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
584
584
  <application android:usesCleartextTraffic="true" tools:replace="android:usesCleartextTraffic">
585
- <meta-data android:name="com.hotupdater.CHANNEL" android:value="${xml(channel)}" tools:replace="android:value" />
586
585
  <meta-data android:name="${SANDBOX_META_DATA}" android:value="true" />
587
586
  <activity android:name="${SANDBOX_ACTIVITY}" android:exported="true" android:launchMode="singleTop" android:theme="@style/HotUpdaterSandboxTheme" android:configChanges="density|fontScale|fontWeightAdjustment|keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:enableOnBackInvokedCallback="true"${optional("label", launcher.label)}${optional("icon", launcher.icon)}${optional("roundIcon", launcher.roundIcon)}>
588
587
  ${filterXml(launcher.filter)}
@@ -701,7 +700,6 @@ const withSandboxGradleArgs = async (scheme, readEffectiveManifest, build, { min
701
700
  const overlay = path.join(directory, "AndroidManifest.xml");
702
701
  const initScript = path.join(directory, "sandbox.init.gradle");
703
702
  await fs.promises.writeFile(overlay, sandboxManifestOverlay({
704
- channel: sandboxChannelOf(scheme.hotUpdaterSchemeName),
705
703
  urlScheme,
706
704
  launcher
707
705
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/android-helper",
3
- "version": "1.2.0-rc.40",
3
+ "version": "1.2.0-rc.41",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -30,9 +30,9 @@
30
30
  "execa": "9.5.2",
31
31
  "fast-xml-parser": "5.7.2",
32
32
  "jszip": "^3.10.1",
33
- "@hot-updater/cli-tools": "1.2.0-rc.40",
34
- "@hot-updater/protocol": "1.2.0-rc.40",
35
- "@hot-updater/plugin-core": "1.2.0-rc.40"
33
+ "@hot-updater/cli-tools": "1.2.0-rc.41",
34
+ "@hot-updater/plugin-core": "1.2.0-rc.41",
35
+ "@hot-updater/protocol": "1.2.0-rc.41"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^20"