hot-updater 0.3.0 → 0.3.1
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/components/banner.d.ts +1 -0
- package/dist/index.cjs +12 -14
- package/dist/index.js +12 -14
- package/package.json +4 -4
- package/dist/commands/generateSecretKey.d.ts +0 -1
package/dist/index.cjs
CHANGED
|
@@ -15670,10 +15670,11 @@ var __webpack_exports__ = {};
|
|
|
15670
15670
|
}
|
|
15671
15671
|
var picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.js");
|
|
15672
15672
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
15673
|
+
const banner_link = (url)=>picocolors_default().green(picocolors_default().underline(url));
|
|
15673
15674
|
const banner = boxen([
|
|
15674
15675
|
`${picocolors_default().bold("Hot Updater - React Native OTA Solution")} v${packageJson_version}`,
|
|
15675
15676
|
"",
|
|
15676
|
-
`Github: ${
|
|
15677
|
+
`Github: ${banner_link("https://github.com/gronxb/hot-updater")}`,
|
|
15677
15678
|
"Give a ⭐️ if you like it!"
|
|
15678
15679
|
].join("\n"), {
|
|
15679
15680
|
padding: 1,
|
|
@@ -15803,13 +15804,6 @@ var __webpack_exports__ = {};
|
|
|
15803
15804
|
await databasePlugin.onUnmount?.();
|
|
15804
15805
|
}
|
|
15805
15806
|
};
|
|
15806
|
-
const generateSecretKey = async ()=>{
|
|
15807
|
-
const secretKey = external_crypto_default().randomBytes(32).toString("hex");
|
|
15808
|
-
await (0, prompts_namespaceObject.text)({
|
|
15809
|
-
message: "Secret Key: ",
|
|
15810
|
-
initialValue: secretKey
|
|
15811
|
-
});
|
|
15812
|
-
};
|
|
15813
15807
|
const getPackageManager = ()=>{
|
|
15814
15808
|
const [packageManagerWithVersion] = process.env["npm_config_user_agent"]?.split(" ") ?? [];
|
|
15815
15809
|
if (!packageManagerWithVersion) return "npm";
|
|
@@ -21929,12 +21923,16 @@ export default defineConfig({
|
|
|
21929
21923
|
}),
|
|
21930
21924
|
});
|
|
21931
21925
|
`;
|
|
21932
|
-
const SOURCE_TEMPLATE =
|
|
21933
|
-
|
|
21934
|
-
|
|
21926
|
+
const SOURCE_TEMPLATE = `// add this to your App.tsx
|
|
21927
|
+
import { HotUpdater } from "@hot-updater/react-native";
|
|
21928
|
+
|
|
21929
|
+
function App() {
|
|
21930
|
+
return ...
|
|
21931
|
+
}
|
|
21932
|
+
|
|
21933
|
+
export default HotUpdater.wrap({
|
|
21935
21934
|
source: "%%source%%",
|
|
21936
|
-
})
|
|
21937
|
-
`;
|
|
21935
|
+
})(App);`;
|
|
21938
21936
|
const selectOrCreateOrganization = async ()=>{
|
|
21939
21937
|
const confirmed = await prompts_namespaceObject.confirm({
|
|
21940
21938
|
message: "Do you already have a Supabase organization?",
|
|
@@ -22194,6 +22192,7 @@ HotUpdater.init({
|
|
|
22194
22192
|
prompts_namespaceObject.note(transformTemplate(SOURCE_TEMPLATE, {
|
|
22195
22193
|
source: `https://${project.id}.supabase.co/functions/v1/update-server`
|
|
22196
22194
|
}));
|
|
22195
|
+
prompts_namespaceObject.log.message(`Next step: ${banner_link("https://gronxb.github.io/hot-updater/guide/getting-started/quick-start-with-supabase.html#step-4-add-hotupdater-to-your-project")}`);
|
|
22197
22196
|
prompts_namespaceObject.log.success("Done! 🎉");
|
|
22198
22197
|
};
|
|
22199
22198
|
const REQUIRED_PACKAGES = {
|
|
@@ -22320,7 +22319,6 @@ HotUpdater.init({
|
|
|
22320
22319
|
console.log(`Server running on ${picocolors_default().magenta(picocolors_default().underline(`http://localhost:${info.port}`))}`);
|
|
22321
22320
|
});
|
|
22322
22321
|
});
|
|
22323
|
-
program.command("generate-secret-key").description("generate a new secret key").action(generateSecretKey);
|
|
22324
22322
|
program.command("app-version").description("get the current app version").action(async ()=>{
|
|
22325
22323
|
const path = (0, plugin_core_namespaceObject.getCwd)();
|
|
22326
22324
|
const androidVersion = await getDefaultTargetAppVersion(path, "android");
|
package/dist/index.js
CHANGED
|
@@ -15578,10 +15578,11 @@ function boxen(text, options) {
|
|
|
15578
15578
|
}
|
|
15579
15579
|
var picocolors = __webpack_require__("../../node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.js");
|
|
15580
15580
|
var picocolors_default = /*#__PURE__*/ __webpack_require__.n(picocolors);
|
|
15581
|
+
const banner_link = (url)=>picocolors_default().green(picocolors_default().underline(url));
|
|
15581
15582
|
const banner = boxen([
|
|
15582
15583
|
`${picocolors_default().bold("Hot Updater - React Native OTA Solution")} v${packageJson_version}`,
|
|
15583
15584
|
"",
|
|
15584
|
-
`Github: ${
|
|
15585
|
+
`Github: ${banner_link("https://github.com/gronxb/hot-updater")}`,
|
|
15585
15586
|
"Give a ⭐️ if you like it!"
|
|
15586
15587
|
].join("\n"), {
|
|
15587
15588
|
padding: 1,
|
|
@@ -15711,13 +15712,6 @@ const deploy = async (options)=>{
|
|
|
15711
15712
|
await databasePlugin.onUnmount?.();
|
|
15712
15713
|
}
|
|
15713
15714
|
};
|
|
15714
|
-
const generateSecretKey = async ()=>{
|
|
15715
|
-
const secretKey = __WEBPACK_EXTERNAL_MODULE_crypto__["default"].randomBytes(32).toString("hex");
|
|
15716
|
-
await (0, __WEBPACK_EXTERNAL_MODULE__clack_prompts__.text)({
|
|
15717
|
-
message: "Secret Key: ",
|
|
15718
|
-
initialValue: secretKey
|
|
15719
|
-
});
|
|
15720
|
-
};
|
|
15721
15715
|
const getPackageManager = ()=>{
|
|
15722
15716
|
const [packageManagerWithVersion] = process.env["npm_config_user_agent"]?.split(" ") ?? [];
|
|
15723
15717
|
if (!packageManagerWithVersion) return "npm";
|
|
@@ -21830,12 +21824,16 @@ export default defineConfig({
|
|
|
21830
21824
|
}),
|
|
21831
21825
|
});
|
|
21832
21826
|
`;
|
|
21833
|
-
const SOURCE_TEMPLATE =
|
|
21834
|
-
|
|
21835
|
-
|
|
21827
|
+
const SOURCE_TEMPLATE = `// add this to your App.tsx
|
|
21828
|
+
import { HotUpdater } from "@hot-updater/react-native";
|
|
21829
|
+
|
|
21830
|
+
function App() {
|
|
21831
|
+
return ...
|
|
21832
|
+
}
|
|
21833
|
+
|
|
21834
|
+
export default HotUpdater.wrap({
|
|
21836
21835
|
source: "%%source%%",
|
|
21837
|
-
})
|
|
21838
|
-
`;
|
|
21836
|
+
})(App);`;
|
|
21839
21837
|
const selectOrCreateOrganization = async ()=>{
|
|
21840
21838
|
const confirmed = await __WEBPACK_EXTERNAL_MODULE__clack_prompts__.confirm({
|
|
21841
21839
|
message: "Do you already have a Supabase organization?",
|
|
@@ -22095,6 +22093,7 @@ const initSupabase = async ()=>{
|
|
|
22095
22093
|
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.note(transformTemplate(SOURCE_TEMPLATE, {
|
|
22096
22094
|
source: `https://${project.id}.supabase.co/functions/v1/update-server`
|
|
22097
22095
|
}));
|
|
22096
|
+
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.message(`Next step: ${banner_link("https://gronxb.github.io/hot-updater/guide/getting-started/quick-start-with-supabase.html#step-4-add-hotupdater-to-your-project")}`);
|
|
22098
22097
|
__WEBPACK_EXTERNAL_MODULE__clack_prompts__.log.success("Done! 🎉");
|
|
22099
22098
|
};
|
|
22100
22099
|
const REQUIRED_PACKAGES = {
|
|
@@ -22220,7 +22219,6 @@ program.command("console").description("open the console").action(async ()=>{
|
|
|
22220
22219
|
console.log(`Server running on ${picocolors_default().magenta(picocolors_default().underline(`http://localhost:${info.port}`))}`);
|
|
22221
22220
|
});
|
|
22222
22221
|
});
|
|
22223
|
-
program.command("generate-secret-key").description("generate a new secret key").action(generateSecretKey);
|
|
22224
22222
|
program.command("app-version").description("get the current app version").action(async ()=>{
|
|
22225
22223
|
const path = (0, __WEBPACK_EXTERNAL_MODULE__hot_updater_plugin_core__.getCwd)();
|
|
22226
22224
|
const androidVersion = await getDefaultTargetAppVersion(path, "android");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hot-updater",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"bin": {
|
|
6
6
|
"hot-updater": "./dist/index.js"
|
|
7
7
|
},
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@clack/prompts": "^0.9.0",
|
|
42
|
-
"@hot-updater/console": "0.3.
|
|
43
|
-
"@hot-updater/core": "0.3.
|
|
44
|
-
"@hot-updater/plugin-core": "0.3.
|
|
42
|
+
"@hot-updater/console": "0.3.1",
|
|
43
|
+
"@hot-updater/core": "0.3.1",
|
|
44
|
+
"@hot-updater/plugin-core": "0.3.1",
|
|
45
45
|
"commander": "^11.1.0",
|
|
46
46
|
"cosmiconfig": "^9.0.0",
|
|
47
47
|
"cosmiconfig-typescript-loader": "^5.0.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const generateSecretKey: () => Promise<void>;
|