@hot-updater/bare 1.0.8 → 1.1.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/index.cjs +8 -0
- package/dist/index.d.cts +8 -2
- package/dist/index.d.mts +8 -2
- package/dist/index.mjs +9 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -6422,9 +6422,16 @@ const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enabl
|
|
|
6422
6422
|
stdout: null
|
|
6423
6423
|
};
|
|
6424
6424
|
};
|
|
6425
|
+
/**
|
|
6426
|
+
* The bare adapter's native fingerprint: the native interface React Native
|
|
6427
|
+
* CLI's `react-native config` reports. `hot-updater fingerprint hash` calls
|
|
6428
|
+
* it during native builds, from the inputs fingerprint.json records.
|
|
6429
|
+
*/
|
|
6430
|
+
const bareFingerprint = (cwd, options) => (0, _hot_updater_cli_tools.reactNativeCliFingerprint)(cwd, options);
|
|
6425
6431
|
const bare = (config) => ({ cwd }) => {
|
|
6426
6432
|
const { outDir = "dist", sourcemap = false, entryFile = "index.js", enableHermes, resetCache = true } = config;
|
|
6427
6433
|
return {
|
|
6434
|
+
nativeBuild: { fingerprint: (options) => bareFingerprint(cwd, options) },
|
|
6428
6435
|
build: async ({ platform }) => {
|
|
6429
6436
|
const buildPath = path.default.join(cwd, outDir);
|
|
6430
6437
|
await fs_promises.default.rm(buildPath, {
|
|
@@ -6452,5 +6459,6 @@ const bare = (config) => ({ cwd }) => {
|
|
|
6452
6459
|
};
|
|
6453
6460
|
//#endregion
|
|
6454
6461
|
exports.bare = bare;
|
|
6462
|
+
exports.bareFingerprint = bareFingerprint;
|
|
6455
6463
|
exports.compileHermes = compileHermes;
|
|
6456
6464
|
exports.getHermesCommand = getHermesCommand;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { BuildAdapter, BuildAdapterArgs, BuildAdapterConfig } from "@hot-updater/plugin-core";
|
|
1
|
+
import { BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, NativeFingerprintOptions } from "@hot-updater/plugin-core";
|
|
2
2
|
//#region src/bare.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The bare adapter's native fingerprint: the native interface React Native
|
|
5
|
+
* CLI's `react-native config` reports. `hot-updater fingerprint hash` calls
|
|
6
|
+
* it during native builds, from the inputs fingerprint.json records.
|
|
7
|
+
*/
|
|
8
|
+
declare const bareFingerprint: (cwd: string, options: NativeFingerprintOptions) => Promise<import("@hot-updater/plugin-core").NativeFingerprint>;
|
|
3
9
|
interface BareAdapterConfig extends BuildAdapterConfig {
|
|
4
10
|
/**
|
|
5
11
|
* @default "index.js"
|
|
@@ -52,4 +58,4 @@ declare function compileHermes({ cwd, sourcemap, inputJsFile }: {
|
|
|
52
58
|
hermesVersion: string;
|
|
53
59
|
}>;
|
|
54
60
|
//#endregion
|
|
55
|
-
export { BareAdapterConfig, bare, compileHermes, getHermesCommand };
|
|
61
|
+
export { BareAdapterConfig, bare, bareFingerprint, compileHermes, getHermesCommand };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { BuildAdapter, BuildAdapterArgs, BuildAdapterConfig } from "@hot-updater/plugin-core";
|
|
1
|
+
import { BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, NativeFingerprintOptions } from "@hot-updater/plugin-core";
|
|
2
2
|
//#region src/bare.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The bare adapter's native fingerprint: the native interface React Native
|
|
5
|
+
* CLI's `react-native config` reports. `hot-updater fingerprint hash` calls
|
|
6
|
+
* it during native builds, from the inputs fingerprint.json records.
|
|
7
|
+
*/
|
|
8
|
+
declare const bareFingerprint: (cwd: string, options: NativeFingerprintOptions) => Promise<import("@hot-updater/plugin-core").NativeFingerprint>;
|
|
3
9
|
interface BareAdapterConfig extends BuildAdapterConfig {
|
|
4
10
|
/**
|
|
5
11
|
* @default "index.js"
|
|
@@ -52,4 +58,4 @@ declare function compileHermes({ cwd, sourcemap, inputJsFile }: {
|
|
|
52
58
|
hermesVersion: string;
|
|
53
59
|
}>;
|
|
54
60
|
//#endregion
|
|
55
|
-
export { BareAdapterConfig, bare, compileHermes, getHermesCommand };
|
|
61
|
+
export { BareAdapterConfig, bare, bareFingerprint, compileHermes, getHermesCommand };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import fs from "fs/promises";
|
|
3
3
|
import path from "path";
|
|
4
|
-
import { getReactNativeMetadatas, log } from "@hot-updater/cli-tools";
|
|
4
|
+
import { getReactNativeMetadatas, log, reactNativeCliFingerprint } from "@hot-updater/cli-tools";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
|
|
7
7
|
import { StringDecoder } from "node:string_decoder";
|
|
@@ -6416,9 +6416,16 @@ const runBundle = async ({ entryFile, cwd, platform, buildPath, sourcemap, enabl
|
|
|
6416
6416
|
stdout: null
|
|
6417
6417
|
};
|
|
6418
6418
|
};
|
|
6419
|
+
/**
|
|
6420
|
+
* The bare adapter's native fingerprint: the native interface React Native
|
|
6421
|
+
* CLI's `react-native config` reports. `hot-updater fingerprint hash` calls
|
|
6422
|
+
* it during native builds, from the inputs fingerprint.json records.
|
|
6423
|
+
*/
|
|
6424
|
+
const bareFingerprint = (cwd, options) => reactNativeCliFingerprint(cwd, options);
|
|
6419
6425
|
const bare = (config) => ({ cwd }) => {
|
|
6420
6426
|
const { outDir = "dist", sourcemap = false, entryFile = "index.js", enableHermes, resetCache = true } = config;
|
|
6421
6427
|
return {
|
|
6428
|
+
nativeBuild: { fingerprint: (options) => bareFingerprint(cwd, options) },
|
|
6422
6429
|
build: async ({ platform }) => {
|
|
6423
6430
|
const buildPath = path.join(cwd, outDir);
|
|
6424
6431
|
await fs.rm(buildPath, {
|
|
@@ -6445,4 +6452,4 @@ const bare = (config) => ({ cwd }) => {
|
|
|
6445
6452
|
};
|
|
6446
6453
|
};
|
|
6447
6454
|
//#endregion
|
|
6448
|
-
export { bare, compileHermes, getHermesCommand };
|
|
6455
|
+
export { bare, bareFingerprint, compileHermes, getHermesCommand };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/bare",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.1",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"uuidv7": "^1.0.2",
|
|
28
|
-
"@hot-updater/cli-tools": "1.
|
|
29
|
-
"@hot-updater/plugin-core": "1.
|
|
28
|
+
"@hot-updater/cli-tools": "1.1.1",
|
|
29
|
+
"@hot-updater/plugin-core": "1.1.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^20",
|