@hot-updater/expo 0.29.3 → 0.29.4
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 +4 -4
- package/dist/index.mjs +19 -19
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
enumerable: true
|
|
23
23
|
}) : target, mod));
|
|
24
24
|
//#endregion
|
|
25
|
+
let fs = require("fs");
|
|
26
|
+
fs = __toESM(fs);
|
|
27
|
+
let path = require("path");
|
|
28
|
+
path = __toESM(path);
|
|
25
29
|
let _hot_updater_bare = require("@hot-updater/bare");
|
|
26
30
|
let _hot_updater_cli_tools = require("@hot-updater/cli-tools");
|
|
27
31
|
let node_url = require("node:url");
|
|
@@ -34,10 +38,6 @@ let node_tty = require("node:tty");
|
|
|
34
38
|
node_tty = __toESM(node_tty);
|
|
35
39
|
let node_path = require("node:path");
|
|
36
40
|
node_path = __toESM(node_path);
|
|
37
|
-
let path = require("path");
|
|
38
|
-
path = __toESM(path);
|
|
39
|
-
let fs = require("fs");
|
|
40
|
-
fs = __toESM(fs);
|
|
41
41
|
let node_timers_promises = require("node:timers/promises");
|
|
42
42
|
let node_os = require("node:os");
|
|
43
43
|
let node_events = require("node:events");
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
+
import * as fs$1 from "fs";
|
|
3
|
+
import fs from "fs";
|
|
4
|
+
import * as path$2 from "path";
|
|
5
|
+
import path from "path";
|
|
2
6
|
import { compileHermes } from "@hot-updater/bare";
|
|
3
7
|
import { log, p } from "@hot-updater/cli-tools";
|
|
4
8
|
import { fileURLToPath } from "node:url";
|
|
@@ -7,11 +11,7 @@ import { StringDecoder } from "node:string_decoder";
|
|
|
7
11
|
import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
8
12
|
import process$1, { execArgv, execPath, hrtime, platform } from "node:process";
|
|
9
13
|
import tty from "node:tty";
|
|
10
|
-
import path from "node:path";
|
|
11
|
-
import * as path$2 from "path";
|
|
12
|
-
import path$1 from "path";
|
|
13
|
-
import * as fs$1 from "fs";
|
|
14
|
-
import fs from "fs";
|
|
14
|
+
import path$1 from "node:path";
|
|
15
15
|
import { scheduler, setImmediate, setTimeout } from "node:timers/promises";
|
|
16
16
|
import { constants } from "node:os";
|
|
17
17
|
import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
|
|
@@ -1216,33 +1216,33 @@ function toPath(urlOrPath) {
|
|
|
1216
1216
|
}
|
|
1217
1217
|
function traversePathUp(startPath) {
|
|
1218
1218
|
return { *[Symbol.iterator]() {
|
|
1219
|
-
let currentPath = path.resolve(toPath(startPath));
|
|
1219
|
+
let currentPath = path$1.resolve(toPath(startPath));
|
|
1220
1220
|
let previousPath;
|
|
1221
1221
|
while (previousPath !== currentPath) {
|
|
1222
1222
|
yield currentPath;
|
|
1223
1223
|
previousPath = currentPath;
|
|
1224
|
-
currentPath = path.resolve(currentPath, "..");
|
|
1224
|
+
currentPath = path$1.resolve(currentPath, "..");
|
|
1225
1225
|
}
|
|
1226
1226
|
} };
|
|
1227
1227
|
}
|
|
1228
1228
|
//#endregion
|
|
1229
1229
|
//#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
|
|
1230
1230
|
const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath = process$1.execPath, addExecPath = true } = {}) => {
|
|
1231
|
-
const cwdPath = path.resolve(toPath(cwd));
|
|
1231
|
+
const cwdPath = path$1.resolve(toPath(cwd));
|
|
1232
1232
|
const result = [];
|
|
1233
|
-
const pathParts = pathOption.split(path.delimiter);
|
|
1233
|
+
const pathParts = pathOption.split(path$1.delimiter);
|
|
1234
1234
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
1235
1235
|
if (addExecPath) applyExecPath(result, pathParts, execPath, cwdPath);
|
|
1236
|
-
return pathOption === "" || pathOption === path.delimiter ? `${result.join(path.delimiter)}${pathOption}` : [...result, pathOption].join(path.delimiter);
|
|
1236
|
+
return pathOption === "" || pathOption === path$1.delimiter ? `${result.join(path$1.delimiter)}${pathOption}` : [...result, pathOption].join(path$1.delimiter);
|
|
1237
1237
|
};
|
|
1238
1238
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
1239
1239
|
for (const directory of traversePathUp(cwdPath)) {
|
|
1240
|
-
const pathPart = path.join(directory, "node_modules/.bin");
|
|
1240
|
+
const pathPart = path$1.join(directory, "node_modules/.bin");
|
|
1241
1241
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1242
1242
|
}
|
|
1243
1243
|
};
|
|
1244
1244
|
const applyExecPath = (result, pathParts, execPath, cwdPath) => {
|
|
1245
|
-
const pathPart = path.resolve(cwdPath, toPath(execPath), "..");
|
|
1245
|
+
const pathPart = path$1.resolve(cwdPath, toPath(execPath), "..");
|
|
1246
1246
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
1247
1247
|
};
|
|
1248
1248
|
const npmRunPathEnv = ({ env = process$1.env, ...options } = {}) => {
|
|
@@ -2252,7 +2252,7 @@ const mapNode = ({ options }) => {
|
|
|
2252
2252
|
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
2253
2253
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
2254
2254
|
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
2255
|
-
const resolvedNodePath = path.resolve(cwd, normalizedNodePath);
|
|
2255
|
+
const resolvedNodePath = path$1.resolve(cwd, normalizedNodePath);
|
|
2256
2256
|
const newOptions = {
|
|
2257
2257
|
...options,
|
|
2258
2258
|
nodePath: resolvedNodePath,
|
|
@@ -2264,7 +2264,7 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
2264
2264
|
commandArguments,
|
|
2265
2265
|
newOptions
|
|
2266
2266
|
];
|
|
2267
|
-
if (path.basename(file, ".exe") === "node") throw new TypeError("When the \"node\" option is true, the first argument does not need to be \"node\".");
|
|
2267
|
+
if (path$1.basename(file, ".exe") === "node") throw new TypeError("When the \"node\" option is true, the first argument does not need to be \"node\".");
|
|
2268
2268
|
return [
|
|
2269
2269
|
resolvedNodePath,
|
|
2270
2270
|
[
|
|
@@ -2348,7 +2348,7 @@ const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encod
|
|
|
2348
2348
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/cwd.js
|
|
2349
2349
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
2350
2350
|
const cwdString = safeNormalizeFileUrl(cwd, "The \"cwd\" option");
|
|
2351
|
-
return path.resolve(cwdString);
|
|
2351
|
+
return path$1.resolve(cwdString);
|
|
2352
2352
|
};
|
|
2353
2353
|
const getDefaultCwd = () => {
|
|
2354
2354
|
try {
|
|
@@ -2386,7 +2386,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
2386
2386
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
2387
2387
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
2388
2388
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
2389
|
-
if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
2389
|
+
if (process$1.platform === "win32" && path$1.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
2390
2390
|
return {
|
|
2391
2391
|
file,
|
|
2392
2392
|
commandArguments,
|
|
@@ -6265,7 +6265,7 @@ const runExpoPrebuild = async ({ platform }) => {
|
|
|
6265
6265
|
//#region src/expo.ts
|
|
6266
6266
|
const isHermesEnabled = (cwd, platform) => {
|
|
6267
6267
|
try {
|
|
6268
|
-
const appJsonPath = path
|
|
6268
|
+
const appJsonPath = path.join(cwd, "app.json");
|
|
6269
6269
|
const { expo } = JSON.parse(fs.readFileSync(appJsonPath, "utf-8"));
|
|
6270
6270
|
const platformJsEngine = expo?.[platform]?.jsEngine;
|
|
6271
6271
|
const commonJsEngine = expo?.jsEngine;
|
|
@@ -6276,7 +6276,7 @@ const isHermesEnabled = (cwd, platform) => {
|
|
|
6276
6276
|
};
|
|
6277
6277
|
const runBundle = async ({ cwd, platform, buildPath, sourcemap, resetCache }) => {
|
|
6278
6278
|
const filename = `index.${platform}`;
|
|
6279
|
-
const bundleOutput = path
|
|
6279
|
+
const bundleOutput = path.join(buildPath, `${filename}.bundle`);
|
|
6280
6280
|
const entryFile = resolveMain(cwd);
|
|
6281
6281
|
const bundleId = uuidv7();
|
|
6282
6282
|
const args = [
|
|
@@ -6331,7 +6331,7 @@ const expo = (config = {
|
|
|
6331
6331
|
await runExpoPrebuild({ platform });
|
|
6332
6332
|
} },
|
|
6333
6333
|
build: async ({ platform }) => {
|
|
6334
|
-
const buildPath = path
|
|
6334
|
+
const buildPath = path.join(cwd, outDir);
|
|
6335
6335
|
await fs.promises.rm(buildPath, {
|
|
6336
6336
|
recursive: true,
|
|
6337
6337
|
force: true
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/expo",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.29.
|
|
4
|
+
"version": "0.29.4",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"@babel/core": "7.26.0",
|
|
25
25
|
"@babel/types": "7.26.0",
|
|
26
26
|
"uuidv7": "^1.0.2",
|
|
27
|
-
"@hot-updater/
|
|
28
|
-
"@hot-updater/
|
|
29
|
-
"@hot-updater/plugin-core": "0.29.
|
|
27
|
+
"@hot-updater/cli-tools": "0.29.4",
|
|
28
|
+
"@hot-updater/bare": "0.29.4",
|
|
29
|
+
"@hot-updater/plugin-core": "0.29.4"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^20",
|