hot-updater 0.19.1 → 0.19.3
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/config.cjs
CHANGED
package/dist/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createFingerprintJson, generateFingerprint, generateFingerprints, readLocalFingerprint } from "./fingerprint-
|
|
1
|
+
import { createFingerprintJson, generateFingerprint, generateFingerprints, readLocalFingerprint } from "./fingerprint-LuSkVvkB.js";
|
|
2
2
|
|
|
3
3
|
//#region src/config.ts
|
|
4
4
|
const defineConfig = (config) => {
|
|
@@ -5,7 +5,7 @@ const path = require_chunk.__toESM(require("path"));
|
|
|
5
5
|
const __clack_prompts = require_chunk.__toESM(require("@clack/prompts"));
|
|
6
6
|
const __expo_fingerprint = require_chunk.__toESM(require("@expo/fingerprint"));
|
|
7
7
|
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
8
|
-
const
|
|
8
|
+
const fast_glob = require_chunk.__toESM(require("fast-glob"));
|
|
9
9
|
|
|
10
10
|
//#region src/utils/fingerprint/processExtraSources.ts
|
|
11
11
|
/**
|
|
@@ -18,7 +18,7 @@ const globby = require_chunk.__toESM(require("globby"));
|
|
|
18
18
|
function processExtraSources(extraSources, cwd, ignorePaths) {
|
|
19
19
|
const processedSources = [];
|
|
20
20
|
for (const source of extraSources) try {
|
|
21
|
-
const matches =
|
|
21
|
+
const matches = fast_glob.default.globSync(source, {
|
|
22
22
|
cwd,
|
|
23
23
|
ignore: ignorePaths ?? [],
|
|
24
24
|
absolute: true,
|
|
@@ -58,7 +58,8 @@ async function nativeFingerprint(path$2, options) {
|
|
|
58
58
|
"**/ios/**/Info.plist",
|
|
59
59
|
...options.ignorePaths
|
|
60
60
|
],
|
|
61
|
-
extraSources: processExtraSources(options.extraSources, path$2, options.ignorePaths)
|
|
61
|
+
extraSources: processExtraSources(options.extraSources, path$2, options.ignorePaths),
|
|
62
|
+
debug: options.debug
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
const ensureFingerprintConfig = async () => {
|
|
@@ -4,7 +4,7 @@ import path from "path";
|
|
|
4
4
|
import * as p from "@clack/prompts";
|
|
5
5
|
import { createFingerprintAsync } from "@expo/fingerprint";
|
|
6
6
|
import fs$1 from "node:fs";
|
|
7
|
-
import
|
|
7
|
+
import fg from "fast-glob";
|
|
8
8
|
|
|
9
9
|
//#region src/utils/fingerprint/processExtraSources.ts
|
|
10
10
|
/**
|
|
@@ -17,7 +17,7 @@ import { globbySync } from "globby";
|
|
|
17
17
|
function processExtraSources(extraSources, cwd, ignorePaths) {
|
|
18
18
|
const processedSources = [];
|
|
19
19
|
for (const source of extraSources) try {
|
|
20
|
-
const matches =
|
|
20
|
+
const matches = fg.globSync(source, {
|
|
21
21
|
cwd,
|
|
22
22
|
ignore: ignorePaths ?? [],
|
|
23
23
|
absolute: true,
|
|
@@ -57,7 +57,8 @@ async function nativeFingerprint(path$1, options) {
|
|
|
57
57
|
"**/ios/**/Info.plist",
|
|
58
58
|
...options.ignorePaths
|
|
59
59
|
],
|
|
60
|
-
extraSources: processExtraSources(options.extraSources, path$1, options.ignorePaths)
|
|
60
|
+
extraSources: processExtraSources(options.extraSources, path$1, options.ignorePaths),
|
|
61
|
+
debug: options.debug
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
const ensureFingerprintConfig = async () => {
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const require_chunk = require('./chunk-DWy1uDak.cjs');
|
|
3
|
-
const require_fingerprint = require('./fingerprint-
|
|
3
|
+
const require_fingerprint = require('./fingerprint-B0eg9rrR.cjs');
|
|
4
4
|
const require_picocolors$1 = require('./picocolors--H0eYra-.cjs');
|
|
5
5
|
const http = require_chunk.__toESM(require("http"));
|
|
6
6
|
const http2 = require_chunk.__toESM(require("http2"));
|
|
@@ -12,7 +12,7 @@ const fs = require_chunk.__toESM(require("fs"));
|
|
|
12
12
|
const path = require_chunk.__toESM(require("path"));
|
|
13
13
|
const __clack_prompts = require_chunk.__toESM(require("@clack/prompts"));
|
|
14
14
|
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
15
|
-
const
|
|
15
|
+
const fast_glob = require_chunk.__toESM(require("fast-glob"));
|
|
16
16
|
const fs_promises = require_chunk.__toESM(require("fs/promises"));
|
|
17
17
|
const es_git = require_chunk.__toESM(require("es-git"));
|
|
18
18
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
@@ -13703,7 +13703,7 @@ var require_plist = require_chunk.__commonJS({ "../../node_modules/.pnpm/plist@3
|
|
|
13703
13703
|
//#region src/utils/getIosAppTargetDirectoryName.ts
|
|
13704
13704
|
const getIosAppTargetDirectoryName = () => {
|
|
13705
13705
|
const iosDirectory = path.default.join((0, __hot_updater_plugin_core.getCwd)(), "ios");
|
|
13706
|
-
const [xcodeprojPath] =
|
|
13706
|
+
const [xcodeprojPath] = fast_glob.default.globSync("*.xcodeproj/project.pbxproj", {
|
|
13707
13707
|
cwd: iosDirectory,
|
|
13708
13708
|
absolute: false,
|
|
13709
13709
|
onlyFiles: true
|
|
@@ -13738,7 +13738,7 @@ const getIOSVersionFromInfoPlist = async () => {
|
|
|
13738
13738
|
};
|
|
13739
13739
|
const getIOSVersionFromXcodeProject = async () => {
|
|
13740
13740
|
try {
|
|
13741
|
-
const [xcodeprojPath] =
|
|
13741
|
+
const [xcodeprojPath] = fast_glob.default.globSync("*.xcodeproj/project.pbxproj", {
|
|
13742
13742
|
cwd: path.default.join((0, __hot_updater_plugin_core.getCwd)(), "ios"),
|
|
13743
13743
|
absolute: true,
|
|
13744
13744
|
onlyFiles: true
|
|
@@ -21118,7 +21118,7 @@ var AndroidConfigParser = class {
|
|
|
21118
21118
|
var import_plist = require_chunk.__toESM(require_plist());
|
|
21119
21119
|
var IosConfigParser = class {
|
|
21120
21120
|
async getPlistPath() {
|
|
21121
|
-
const [plistFile] = await
|
|
21121
|
+
const [plistFile] = await fast_glob.default.glob("*/Info.plist", {
|
|
21122
21122
|
cwd: path.default.join((0, __hot_updater_plugin_core.getCwd)(), "ios"),
|
|
21123
21123
|
absolute: true,
|
|
21124
21124
|
onlyFiles: true
|
|
@@ -21972,12 +21972,18 @@ const handleCreateFingerprint = async () => {
|
|
|
21972
21972
|
await __clack_prompts.tasks([{
|
|
21973
21973
|
title: "Creating fingerprint.json",
|
|
21974
21974
|
task: async () => {
|
|
21975
|
-
|
|
21976
|
-
|
|
21977
|
-
|
|
21978
|
-
|
|
21979
|
-
|
|
21980
|
-
|
|
21975
|
+
try {
|
|
21976
|
+
const localFingerprint = await require_fingerprint.readLocalFingerprint();
|
|
21977
|
+
const newFingerprint = await require_fingerprint.createFingerprintJson();
|
|
21978
|
+
if (!localFingerprint || localFingerprint?.ios?.hash !== newFingerprint.ios.hash || localFingerprint?.android?.hash !== newFingerprint.android.hash) diffChanged = true;
|
|
21979
|
+
await setFingerprintHash("ios", newFingerprint.ios.hash);
|
|
21980
|
+
await setFingerprintHash("android", newFingerprint.android.hash);
|
|
21981
|
+
return "Created fingerprint.json";
|
|
21982
|
+
} catch (error) {
|
|
21983
|
+
if (error instanceof Error) __clack_prompts.log.error(error.message);
|
|
21984
|
+
console.error(error);
|
|
21985
|
+
process.exit(1);
|
|
21986
|
+
}
|
|
21981
21987
|
}
|
|
21982
21988
|
}]);
|
|
21983
21989
|
if (diffChanged) __clack_prompts.log.success(import_picocolors$1.default.bold(`${import_picocolors$1.default.blue("fingerprint.json")} has changed, you need to rebuild the native app.`));
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { __commonJS, __require, __toESM, require_picocolors } from "./picocolors-OFVOrezl.js";
|
|
3
|
-
import { createFingerprintJson, generateFingerprints, nativeFingerprint, readLocalFingerprint } from "./fingerprint-
|
|
3
|
+
import { createFingerprintJson, generateFingerprints, nativeFingerprint, readLocalFingerprint } from "./fingerprint-LuSkVvkB.js";
|
|
4
4
|
import { createServer } from "http";
|
|
5
5
|
import { Http2ServerRequest } from "http2";
|
|
6
6
|
import { Readable } from "stream";
|
|
@@ -18,7 +18,7 @@ import * as p$2 from "@clack/prompts";
|
|
|
18
18
|
import * as p$1 from "@clack/prompts";
|
|
19
19
|
import * as p from "@clack/prompts";
|
|
20
20
|
import fs$1, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
21
|
-
import
|
|
21
|
+
import fg from "fast-glob";
|
|
22
22
|
import fs$2 from "fs/promises";
|
|
23
23
|
import { openRepository } from "es-git";
|
|
24
24
|
import path$1 from "node:path";
|
|
@@ -13715,7 +13715,7 @@ var require_plist = __commonJS({ "../../node_modules/.pnpm/plist@3.1.0/node_modu
|
|
|
13715
13715
|
//#region src/utils/getIosAppTargetDirectoryName.ts
|
|
13716
13716
|
const getIosAppTargetDirectoryName = () => {
|
|
13717
13717
|
const iosDirectory = path.join(getCwd(), "ios");
|
|
13718
|
-
const [xcodeprojPath] =
|
|
13718
|
+
const [xcodeprojPath] = fg.globSync("*.xcodeproj/project.pbxproj", {
|
|
13719
13719
|
cwd: iosDirectory,
|
|
13720
13720
|
absolute: false,
|
|
13721
13721
|
onlyFiles: true
|
|
@@ -13750,7 +13750,7 @@ const getIOSVersionFromInfoPlist = async () => {
|
|
|
13750
13750
|
};
|
|
13751
13751
|
const getIOSVersionFromXcodeProject = async () => {
|
|
13752
13752
|
try {
|
|
13753
|
-
const [xcodeprojPath] =
|
|
13753
|
+
const [xcodeprojPath] = fg.globSync("*.xcodeproj/project.pbxproj", {
|
|
13754
13754
|
cwd: path.join(getCwd(), "ios"),
|
|
13755
13755
|
absolute: true,
|
|
13756
13756
|
onlyFiles: true
|
|
@@ -21130,7 +21130,7 @@ var AndroidConfigParser = class {
|
|
|
21130
21130
|
var import_plist = __toESM(require_plist());
|
|
21131
21131
|
var IosConfigParser = class {
|
|
21132
21132
|
async getPlistPath() {
|
|
21133
|
-
const [plistFile] = await
|
|
21133
|
+
const [plistFile] = await fg.glob("*/Info.plist", {
|
|
21134
21134
|
cwd: path.join(getCwd(), "ios"),
|
|
21135
21135
|
absolute: true,
|
|
21136
21136
|
onlyFiles: true
|
|
@@ -21984,12 +21984,18 @@ const handleCreateFingerprint = async () => {
|
|
|
21984
21984
|
await p$1.tasks([{
|
|
21985
21985
|
title: "Creating fingerprint.json",
|
|
21986
21986
|
task: async () => {
|
|
21987
|
-
|
|
21988
|
-
|
|
21989
|
-
|
|
21990
|
-
|
|
21991
|
-
|
|
21992
|
-
|
|
21987
|
+
try {
|
|
21988
|
+
const localFingerprint = await readLocalFingerprint();
|
|
21989
|
+
const newFingerprint = await createFingerprintJson();
|
|
21990
|
+
if (!localFingerprint || localFingerprint?.ios?.hash !== newFingerprint.ios.hash || localFingerprint?.android?.hash !== newFingerprint.android.hash) diffChanged = true;
|
|
21991
|
+
await setFingerprintHash("ios", newFingerprint.ios.hash);
|
|
21992
|
+
await setFingerprintHash("android", newFingerprint.android.hash);
|
|
21993
|
+
return "Created fingerprint.json";
|
|
21994
|
+
} catch (error) {
|
|
21995
|
+
if (error instanceof Error) p$1.log.error(error.message);
|
|
21996
|
+
console.error(error);
|
|
21997
|
+
process.exit(1);
|
|
21998
|
+
}
|
|
21993
21999
|
}
|
|
21994
22000
|
}]);
|
|
21995
22001
|
if (diffChanged) p$1.log.success(import_picocolors$1.default.bold(`${import_picocolors$1.default.blue("fingerprint.json")} has changed, you need to rebuild the native app.`));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hot-updater",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.19.
|
|
4
|
+
"version": "0.19.3",
|
|
5
5
|
"bin": {
|
|
6
6
|
"hot-updater": "./dist/index.js"
|
|
7
7
|
},
|
|
@@ -48,19 +48,19 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@expo/fingerprint": "0.12.4",
|
|
52
51
|
"@bacons/xcode": "1.0.0-alpha.24",
|
|
53
52
|
"@clack/prompts": "^0.10.0",
|
|
54
53
|
"@commander-js/extra-typings": "^14.0.0",
|
|
54
|
+
"@expo/fingerprint": "0.12.4",
|
|
55
55
|
"commander": "^14.0.0",
|
|
56
56
|
"cosmiconfig": "^9.0.0",
|
|
57
57
|
"cosmiconfig-typescript-loader": "^5.0.0",
|
|
58
58
|
"es-git": "^0.2.0",
|
|
59
|
+
"fast-glob": "^3.3.3",
|
|
59
60
|
"fast-xml-parser": "^5.2.3",
|
|
60
|
-
"
|
|
61
|
-
"@hot-updater/
|
|
62
|
-
"@hot-updater/core": "0.19.
|
|
63
|
-
"@hot-updater/plugin-core": "0.19.1"
|
|
61
|
+
"@hot-updater/console": "0.19.3",
|
|
62
|
+
"@hot-updater/core": "0.19.3",
|
|
63
|
+
"@hot-updater/plugin-core": "0.19.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@babel/core": "7.26.0",
|
|
@@ -86,10 +86,10 @@
|
|
|
86
86
|
"read-package-up": "^11.0.0",
|
|
87
87
|
"semver": "^7.6.3",
|
|
88
88
|
"uuidv7": "^1.0.2",
|
|
89
|
-
"@hot-updater/aws": "0.19.
|
|
90
|
-
"@hot-updater/cloudflare": "0.19.
|
|
91
|
-
"@hot-updater/
|
|
92
|
-
"@hot-updater/
|
|
89
|
+
"@hot-updater/aws": "0.19.3",
|
|
90
|
+
"@hot-updater/cloudflare": "0.19.3",
|
|
91
|
+
"@hot-updater/firebase": "0.19.3",
|
|
92
|
+
"@hot-updater/supabase": "0.19.3"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
95
|
"@hot-updater/aws": "*",
|