@hot-updater/bare 0.16.5 → 0.16.7-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/bare.d.ts +21 -0
- package/dist/index.cjs +11 -2
- package/dist/index.d.ts +2 -21
- package/dist/index.js +4 -1
- package/package.json +2 -2
package/dist/bare.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type BasePluginArgs, type BuildPlugin, type BuildPluginConfig } from "@hot-updater/plugin-core";
|
|
2
|
+
export interface BarePluginConfig extends BuildPluginConfig {
|
|
3
|
+
/**
|
|
4
|
+
* @default "index.js"
|
|
5
|
+
* The entry file to bundle.
|
|
6
|
+
*/
|
|
7
|
+
entryFile?: string;
|
|
8
|
+
/**
|
|
9
|
+
* @default false
|
|
10
|
+
* Whether to generate sourcemap for the bundle.
|
|
11
|
+
*/
|
|
12
|
+
sourcemap?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether to use Hermes to compile the bundle
|
|
15
|
+
* Since React Native v0.70+, Hermes is enabled by default, so it's recommended to enable it.
|
|
16
|
+
* @link https://reactnative.dev/docs/hermes
|
|
17
|
+
* @recommended true
|
|
18
|
+
*/
|
|
19
|
+
enableHermes: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const bare: (config: BarePluginConfig) => ({ cwd }: BasePluginArgs) => BuildPlugin;
|
package/dist/index.cjs
CHANGED
|
@@ -459,7 +459,9 @@ var __webpack_exports__ = {};
|
|
|
459
459
|
"use strict";
|
|
460
460
|
__webpack_require__.r(__webpack_exports__);
|
|
461
461
|
__webpack_require__.d(__webpack_exports__, {
|
|
462
|
-
|
|
462
|
+
compileHermes: ()=>compileHermes,
|
|
463
|
+
bare: ()=>bare,
|
|
464
|
+
getHermesCommand: ()=>getHermesCommand
|
|
463
465
|
});
|
|
464
466
|
var external_path_ = __webpack_require__("path");
|
|
465
467
|
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_);
|
|
@@ -6508,6 +6510,7 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
6508
6510
|
const outputHbcFile = `${inputJsFile}.hbc`;
|
|
6509
6511
|
const hermesArgs = [
|
|
6510
6512
|
"-w",
|
|
6513
|
+
"-O",
|
|
6511
6514
|
"-emit-binary",
|
|
6512
6515
|
"-max-diagnostic-width=80",
|
|
6513
6516
|
"-out",
|
|
@@ -6569,6 +6572,8 @@ Instead, \`yield\` should either be called with a value, or not be called at all
|
|
|
6569
6572
|
entryFile,
|
|
6570
6573
|
"--platform",
|
|
6571
6574
|
platform,
|
|
6575
|
+
"--minify",
|
|
6576
|
+
String(!enableHermes),
|
|
6572
6577
|
...sourcemap ? [
|
|
6573
6578
|
"--sourcemap-output",
|
|
6574
6579
|
`${bundleOutput}.map`
|
|
@@ -6656,8 +6661,12 @@ import { HotUpdaterPlugin } from "@hot-updater/repack";
|
|
|
6656
6661
|
};
|
|
6657
6662
|
})();
|
|
6658
6663
|
exports.bare = __webpack_exports__.bare;
|
|
6664
|
+
exports.compileHermes = __webpack_exports__.compileHermes;
|
|
6665
|
+
exports.getHermesCommand = __webpack_exports__.getHermesCommand;
|
|
6659
6666
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
6660
|
-
"bare"
|
|
6667
|
+
"bare",
|
|
6668
|
+
"compileHermes",
|
|
6669
|
+
"getHermesCommand"
|
|
6661
6670
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
6662
6671
|
Object.defineProperty(exports, '__esModule', {
|
|
6663
6672
|
value: true
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
/**
|
|
4
|
-
* @default "index.js"
|
|
5
|
-
* The entry file to bundle.
|
|
6
|
-
*/
|
|
7
|
-
entryFile?: string;
|
|
8
|
-
/**
|
|
9
|
-
* @default false
|
|
10
|
-
* Whether to generate sourcemap for the bundle.
|
|
11
|
-
*/
|
|
12
|
-
sourcemap?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Whether to use Hermes to compile the bundle
|
|
15
|
-
* Since React Native v0.70+, Hermes is enabled by default, so it's recommended to enable it.
|
|
16
|
-
* @link https://reactnative.dev/docs/hermes
|
|
17
|
-
* @recommended true
|
|
18
|
-
*/
|
|
19
|
-
enableHermes: boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare const bare: (config: BarePluginConfig) => ({ cwd }: BasePluginArgs) => BuildPlugin;
|
|
1
|
+
export * from "./bare";
|
|
2
|
+
export * from "./hermes";
|
package/dist/index.js
CHANGED
|
@@ -6459,6 +6459,7 @@ async function compileHermes({ cwd, sourcemap, inputJsFile }) {
|
|
|
6459
6459
|
const outputHbcFile = `${inputJsFile}.hbc`;
|
|
6460
6460
|
const hermesArgs = [
|
|
6461
6461
|
"-w",
|
|
6462
|
+
"-O",
|
|
6462
6463
|
"-emit-binary",
|
|
6463
6464
|
"-max-diagnostic-width=80",
|
|
6464
6465
|
"-out",
|
|
@@ -6520,6 +6521,8 @@ const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enabl
|
|
|
6520
6521
|
entryFile,
|
|
6521
6522
|
"--platform",
|
|
6522
6523
|
platform,
|
|
6524
|
+
"--minify",
|
|
6525
|
+
String(!enableHermes),
|
|
6523
6526
|
...sourcemap ? [
|
|
6524
6527
|
"--sourcemap-output",
|
|
6525
6528
|
`${bundleOutput}.map`
|
|
@@ -6605,4 +6608,4 @@ const bare = (config)=>({ cwd })=>{
|
|
|
6605
6608
|
name: "bare"
|
|
6606
6609
|
};
|
|
6607
6610
|
};
|
|
6608
|
-
export { bare };
|
|
6611
|
+
export { bare, compileHermes, getHermesCommand };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/bare",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.7-0",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"package.json"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@hot-updater/plugin-core": "0.16.
|
|
24
|
+
"@hot-updater/plugin-core": "0.16.7-0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^22.8.7",
|