hot-updater 0.36.7 → 0.36.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/index.mjs +73 -65
- package/package.json +14 -14
package/dist/index.mjs
CHANGED
|
@@ -27752,6 +27752,79 @@ async function waitForDeletedBundle(databasePlugin, bundleId) {
|
|
|
27752
27752
|
return false;
|
|
27753
27753
|
}
|
|
27754
27754
|
//#endregion
|
|
27755
|
+
//#region src/utils/setChannel.ts
|
|
27756
|
+
const DEFAULT_CHANNEL$1 = "production";
|
|
27757
|
+
const setAndroidChannel = async (channel) => {
|
|
27758
|
+
const config = await loadConfig(null);
|
|
27759
|
+
return await new AndroidConfigParser(config.platform.android.stringResourcePaths ?? [], config.platform.android.androidManifestPaths ?? []).set("hot_updater_channel", channel);
|
|
27760
|
+
};
|
|
27761
|
+
const getAndroidChannel = async () => {
|
|
27762
|
+
const config = await loadConfig(null);
|
|
27763
|
+
const androidParser = new AndroidConfigParser(config.platform.android.stringResourcePaths ?? [], config.platform.android.androidManifestPaths ?? []);
|
|
27764
|
+
if (!await androidParser.exists()) throw new Error("No Android native config files found");
|
|
27765
|
+
const { value, paths } = await androidParser.get("hot_updater_channel");
|
|
27766
|
+
return {
|
|
27767
|
+
value: value ?? DEFAULT_CHANNEL$1,
|
|
27768
|
+
paths
|
|
27769
|
+
};
|
|
27770
|
+
};
|
|
27771
|
+
const setIosChannel = async (channel) => {
|
|
27772
|
+
const customPaths = (await loadConfig(null)).platform.ios.infoPlistPaths;
|
|
27773
|
+
return await new IosConfigParser(customPaths).set("HOT_UPDATER_CHANNEL", channel);
|
|
27774
|
+
};
|
|
27775
|
+
const getIosChannel = async () => {
|
|
27776
|
+
const customPaths = (await loadConfig(null)).platform.ios.infoPlistPaths;
|
|
27777
|
+
const iosParser = new IosConfigParser(customPaths);
|
|
27778
|
+
if (!await iosParser.exists()) throw new Error("No iOS Info.plist files found");
|
|
27779
|
+
const { value, paths } = await iosParser.get("HOT_UPDATER_CHANNEL");
|
|
27780
|
+
return {
|
|
27781
|
+
value: value ?? DEFAULT_CHANNEL$1,
|
|
27782
|
+
paths
|
|
27783
|
+
};
|
|
27784
|
+
};
|
|
27785
|
+
const setChannel = async (platform, channel) => {
|
|
27786
|
+
switch (platform) {
|
|
27787
|
+
case "android": return await setAndroidChannel(channel);
|
|
27788
|
+
case "ios": return await setIosChannel(channel);
|
|
27789
|
+
}
|
|
27790
|
+
};
|
|
27791
|
+
const getChannel = async (platform) => {
|
|
27792
|
+
switch (platform) {
|
|
27793
|
+
case "android": return await getAndroidChannel();
|
|
27794
|
+
case "ios": return await getIosChannel();
|
|
27795
|
+
}
|
|
27796
|
+
};
|
|
27797
|
+
//#endregion
|
|
27798
|
+
//#region src/commands/channel.ts
|
|
27799
|
+
const handleChannel = async () => {
|
|
27800
|
+
const androidChannel = await getChannel("android");
|
|
27801
|
+
const iosChannel = await getChannel("ios");
|
|
27802
|
+
p.log.message(ui.block("Channels", [
|
|
27803
|
+
ui.kv("Android", ui.channel(androidChannel.value)),
|
|
27804
|
+
ui.kv("Path", ui.path(androidChannel.paths[0])),
|
|
27805
|
+
ui.kv("iOS", ui.channel(iosChannel.value)),
|
|
27806
|
+
ui.kv("Path", ui.path(iosChannel.paths[0]))
|
|
27807
|
+
]));
|
|
27808
|
+
};
|
|
27809
|
+
const handleSetChannel = async (channel) => {
|
|
27810
|
+
warnIfExpoCNG();
|
|
27811
|
+
const { paths: androidPaths } = await setChannel("android", channel);
|
|
27812
|
+
p.log.success(ui.line([
|
|
27813
|
+
"Set",
|
|
27814
|
+
ui.platform("Android"),
|
|
27815
|
+
ui.channel(channel)
|
|
27816
|
+
]));
|
|
27817
|
+
if (androidPaths.length > 0) p.log.message(ui.block("Android paths", androidPaths.map((targetPath) => ui.kv("Path", ui.path(targetPath)))));
|
|
27818
|
+
const { paths: iosPaths } = await setChannel("ios", channel);
|
|
27819
|
+
p.log.success(ui.line([
|
|
27820
|
+
"Set",
|
|
27821
|
+
ui.platform("iOS"),
|
|
27822
|
+
ui.channel(channel)
|
|
27823
|
+
]));
|
|
27824
|
+
if (iosPaths.length > 0) p.log.message(ui.block("iOS paths", iosPaths.map((targetPath) => ui.kv("Path", ui.path(targetPath)))));
|
|
27825
|
+
p.log.warn("Rebuild native app after changing channel.");
|
|
27826
|
+
};
|
|
27827
|
+
//#endregion
|
|
27755
27828
|
//#region ../../node_modules/.pnpm/es-toolkit@1.47.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
|
|
27756
27829
|
/**
|
|
27757
27830
|
* Checks if a given value is a plain object.
|
|
@@ -27876,71 +27949,6 @@ function isMergeableValue(value) {
|
|
|
27876
27949
|
return isPlainObject(value) || Array.isArray(value);
|
|
27877
27950
|
}
|
|
27878
27951
|
//#endregion
|
|
27879
|
-
//#region src/utils/setChannel.ts
|
|
27880
|
-
const DEFAULT_CHANNEL$1 = "production";
|
|
27881
|
-
const setAndroidChannel = async (channel) => {
|
|
27882
|
-
const config = await loadConfig(null);
|
|
27883
|
-
return await new AndroidConfigParser(config.platform.android.stringResourcePaths ?? [], config.platform.android.androidManifestPaths ?? []).set("hot_updater_channel", channel);
|
|
27884
|
-
};
|
|
27885
|
-
const getAndroidChannel = async () => {
|
|
27886
|
-
const config = await loadConfig(null);
|
|
27887
|
-
const androidParser = new AndroidConfigParser(config.platform.android.stringResourcePaths ?? [], config.platform.android.androidManifestPaths ?? []);
|
|
27888
|
-
if (!await androidParser.exists()) throw new Error("No Android native config files found");
|
|
27889
|
-
return merge({ value: DEFAULT_CHANNEL$1 }, await androidParser.get("hot_updater_channel"));
|
|
27890
|
-
};
|
|
27891
|
-
const setIosChannel = async (channel) => {
|
|
27892
|
-
const customPaths = (await loadConfig(null)).platform.ios.infoPlistPaths;
|
|
27893
|
-
return await new IosConfigParser(customPaths).set("HOT_UPDATER_CHANNEL", channel);
|
|
27894
|
-
};
|
|
27895
|
-
const getIosChannel = async () => {
|
|
27896
|
-
const customPaths = (await loadConfig(null)).platform.ios.infoPlistPaths;
|
|
27897
|
-
const iosParser = new IosConfigParser(customPaths);
|
|
27898
|
-
if (!await iosParser.exists()) throw new Error("No iOS Info.plist files found");
|
|
27899
|
-
return merge({ value: DEFAULT_CHANNEL$1 }, await iosParser.get("HOT_UPDATER_CHANNEL"));
|
|
27900
|
-
};
|
|
27901
|
-
const setChannel = async (platform, channel) => {
|
|
27902
|
-
switch (platform) {
|
|
27903
|
-
case "android": return await setAndroidChannel(channel);
|
|
27904
|
-
case "ios": return await setIosChannel(channel);
|
|
27905
|
-
}
|
|
27906
|
-
};
|
|
27907
|
-
const getChannel = async (platform) => {
|
|
27908
|
-
switch (platform) {
|
|
27909
|
-
case "android": return await getAndroidChannel();
|
|
27910
|
-
case "ios": return await getIosChannel();
|
|
27911
|
-
}
|
|
27912
|
-
};
|
|
27913
|
-
//#endregion
|
|
27914
|
-
//#region src/commands/channel.ts
|
|
27915
|
-
const handleChannel = async () => {
|
|
27916
|
-
const androidChannel = await getChannel("android");
|
|
27917
|
-
const iosChannel = await getChannel("ios");
|
|
27918
|
-
p.log.message(ui.block("Channels", [
|
|
27919
|
-
ui.kv("Android", ui.channel(androidChannel.value)),
|
|
27920
|
-
ui.kv("Path", ui.path(androidChannel.paths[0])),
|
|
27921
|
-
ui.kv("iOS", ui.channel(iosChannel.value)),
|
|
27922
|
-
ui.kv("Path", ui.path(iosChannel.paths[0]))
|
|
27923
|
-
]));
|
|
27924
|
-
};
|
|
27925
|
-
const handleSetChannel = async (channel) => {
|
|
27926
|
-
warnIfExpoCNG();
|
|
27927
|
-
const { paths: androidPaths } = await setChannel("android", channel);
|
|
27928
|
-
p.log.success(ui.line([
|
|
27929
|
-
"Set",
|
|
27930
|
-
ui.platform("Android"),
|
|
27931
|
-
ui.channel(channel)
|
|
27932
|
-
]));
|
|
27933
|
-
if (androidPaths.length > 0) p.log.message(ui.block("Android paths", androidPaths.map((targetPath) => ui.kv("Path", ui.path(targetPath)))));
|
|
27934
|
-
const { paths: iosPaths } = await setChannel("ios", channel);
|
|
27935
|
-
p.log.success(ui.line([
|
|
27936
|
-
"Set",
|
|
27937
|
-
ui.platform("iOS"),
|
|
27938
|
-
ui.channel(channel)
|
|
27939
|
-
]));
|
|
27940
|
-
if (iosPaths.length > 0) p.log.message(ui.block("iOS paths", iosPaths.map((targetPath) => ui.kv("Path", ui.path(targetPath)))));
|
|
27941
|
-
p.log.warn("Rebuild native app after changing channel.");
|
|
27942
|
-
};
|
|
27943
|
-
//#endregion
|
|
27944
27952
|
//#region src/commands/doctorInfrastructureTargets.ts
|
|
27945
27953
|
const UPDATE_TARGETS = [
|
|
27946
27954
|
{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hot-updater",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.36.
|
|
4
|
+
"version": "0.36.8",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.19.0"
|
|
7
7
|
},
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"jiti": "2.6.1",
|
|
52
|
-
"@hot-updater/
|
|
53
|
-
"@hot-updater/
|
|
54
|
-
"@hot-updater/
|
|
55
|
-
"@hot-updater/console": "0.36.
|
|
56
|
-
"@hot-updater/core": "0.36.
|
|
57
|
-
"@hot-updater/
|
|
58
|
-
"@hot-updater/
|
|
52
|
+
"@hot-updater/android-helper": "0.36.8",
|
|
53
|
+
"@hot-updater/cli-tools": "0.36.8",
|
|
54
|
+
"@hot-updater/apple-helper": "0.36.8",
|
|
55
|
+
"@hot-updater/console": "0.36.8",
|
|
56
|
+
"@hot-updater/core": "0.36.8",
|
|
57
|
+
"@hot-updater/server": "0.36.8",
|
|
58
|
+
"@hot-updater/plugin-core": "0.36.8"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@bacons/xcode": "1.0.0-alpha.33",
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
79
79
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
80
80
|
"verkit": "0.3.2",
|
|
81
|
-
"@hot-updater/cloudflare": "0.36.
|
|
82
|
-
"@hot-updater/
|
|
83
|
-
"@hot-updater/
|
|
84
|
-
"@hot-updater/
|
|
85
|
-
"@hot-updater/
|
|
86
|
-
"@hot-updater/test-utils": "0.36.
|
|
81
|
+
"@hot-updater/cloudflare": "0.36.8",
|
|
82
|
+
"@hot-updater/aws": "0.36.8",
|
|
83
|
+
"@hot-updater/firebase": "0.36.8",
|
|
84
|
+
"@hot-updater/server": "0.36.8",
|
|
85
|
+
"@hot-updater/supabase": "0.36.8",
|
|
86
|
+
"@hot-updater/test-utils": "0.36.8"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
89
|
"@expo/fingerprint": "*",
|