@hot-updater/plugin-core 0.20.2 → 0.20.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/index.cjs +26 -7
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +26 -7
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -16362,16 +16362,38 @@ function merge(target, source) {
|
|
|
16362
16362
|
|
|
16363
16363
|
//#endregion
|
|
16364
16364
|
//#region src/loadConfig.ts
|
|
16365
|
-
const
|
|
16365
|
+
const getDefaultPlatformConfig = () => {
|
|
16366
16366
|
let infoPlistPaths = [];
|
|
16367
16367
|
try {
|
|
16368
|
-
const plistFiles = fast_glob.default.sync("
|
|
16368
|
+
const plistFiles = fast_glob.default.sync("**/Info.plist", {
|
|
16369
16369
|
cwd: path.default.join(getCwd(), "ios"),
|
|
16370
16370
|
absolute: false,
|
|
16371
|
-
onlyFiles: true
|
|
16371
|
+
onlyFiles: true,
|
|
16372
|
+
ignore: [
|
|
16373
|
+
"**/Pods/**",
|
|
16374
|
+
"**/build/**",
|
|
16375
|
+
"**/Build/**",
|
|
16376
|
+
"**/*.app/**",
|
|
16377
|
+
"**/*.xcarchive/**"
|
|
16378
|
+
]
|
|
16372
16379
|
});
|
|
16373
16380
|
if (plistFiles.length > 0) infoPlistPaths = plistFiles.map((file) => `ios/${file}`);
|
|
16374
16381
|
} catch (error) {}
|
|
16382
|
+
let stringResourcePaths = [];
|
|
16383
|
+
try {
|
|
16384
|
+
const stringsFiles = fast_glob.default.sync(path.default.join("**", "strings.xml"), {
|
|
16385
|
+
cwd: path.default.join(getCwd(), "android"),
|
|
16386
|
+
absolute: false,
|
|
16387
|
+
onlyFiles: true
|
|
16388
|
+
});
|
|
16389
|
+
if (stringsFiles.length > 0) stringResourcePaths = stringsFiles.map((file) => path.default.join("android", file));
|
|
16390
|
+
} catch (error) {}
|
|
16391
|
+
return {
|
|
16392
|
+
android: { stringResourcePaths },
|
|
16393
|
+
ios: { infoPlistPaths }
|
|
16394
|
+
};
|
|
16395
|
+
};
|
|
16396
|
+
const getDefaultConfig = () => {
|
|
16375
16397
|
return {
|
|
16376
16398
|
releaseChannel: "production",
|
|
16377
16399
|
updateStrategy: "fingerprint",
|
|
@@ -16380,10 +16402,7 @@ const getDefaultConfig = () => {
|
|
|
16380
16402
|
ignorePaths: []
|
|
16381
16403
|
},
|
|
16382
16404
|
console: { port: 1422 },
|
|
16383
|
-
platform:
|
|
16384
|
-
android: { stringResourcePaths: ["android/app/src/main/res/values/strings.xml"] },
|
|
16385
|
-
ios: { infoPlistPaths }
|
|
16386
|
-
},
|
|
16405
|
+
platform: getDefaultPlatformConfig(),
|
|
16387
16406
|
nativeBuild: { android: {
|
|
16388
16407
|
aab: true,
|
|
16389
16408
|
variant: "Release",
|
package/dist/index.d.cts
CHANGED
|
@@ -88,7 +88,8 @@ interface PlatformConfig {
|
|
|
88
88
|
/**
|
|
89
89
|
* Android string resource paths.
|
|
90
90
|
*
|
|
91
|
-
* @default
|
|
91
|
+
* @default all strings.xml files in the android directory
|
|
92
|
+
* @example ["android/app/src/main/res/values/strings.xml"]
|
|
92
93
|
*/
|
|
93
94
|
stringResourcePaths?: string[];
|
|
94
95
|
};
|
|
@@ -99,7 +100,8 @@ interface PlatformConfig {
|
|
|
99
100
|
/**
|
|
100
101
|
* iOS info.plist paths.
|
|
101
102
|
*
|
|
102
|
-
* @default
|
|
103
|
+
* @default all Info.plist files in the ios directory
|
|
104
|
+
* @example ["ios/HotUpdaterExample/Info.plist"]
|
|
103
105
|
*/
|
|
104
106
|
infoPlistPaths?: string[];
|
|
105
107
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -88,7 +88,8 @@ interface PlatformConfig {
|
|
|
88
88
|
/**
|
|
89
89
|
* Android string resource paths.
|
|
90
90
|
*
|
|
91
|
-
* @default
|
|
91
|
+
* @default all strings.xml files in the android directory
|
|
92
|
+
* @example ["android/app/src/main/res/values/strings.xml"]
|
|
92
93
|
*/
|
|
93
94
|
stringResourcePaths?: string[];
|
|
94
95
|
};
|
|
@@ -99,7 +100,8 @@ interface PlatformConfig {
|
|
|
99
100
|
/**
|
|
100
101
|
* iOS info.plist paths.
|
|
101
102
|
*
|
|
102
|
-
* @default
|
|
103
|
+
* @default all Info.plist files in the ios directory
|
|
104
|
+
* @example ["ios/HotUpdaterExample/Info.plist"]
|
|
103
105
|
*/
|
|
104
106
|
infoPlistPaths?: string[];
|
|
105
107
|
};
|
package/dist/index.js
CHANGED
|
@@ -16364,16 +16364,38 @@ function merge(target, source) {
|
|
|
16364
16364
|
|
|
16365
16365
|
//#endregion
|
|
16366
16366
|
//#region src/loadConfig.ts
|
|
16367
|
-
const
|
|
16367
|
+
const getDefaultPlatformConfig = () => {
|
|
16368
16368
|
let infoPlistPaths = [];
|
|
16369
16369
|
try {
|
|
16370
|
-
const plistFiles = fg.sync("
|
|
16370
|
+
const plistFiles = fg.sync("**/Info.plist", {
|
|
16371
16371
|
cwd: path.join(getCwd(), "ios"),
|
|
16372
16372
|
absolute: false,
|
|
16373
|
-
onlyFiles: true
|
|
16373
|
+
onlyFiles: true,
|
|
16374
|
+
ignore: [
|
|
16375
|
+
"**/Pods/**",
|
|
16376
|
+
"**/build/**",
|
|
16377
|
+
"**/Build/**",
|
|
16378
|
+
"**/*.app/**",
|
|
16379
|
+
"**/*.xcarchive/**"
|
|
16380
|
+
]
|
|
16374
16381
|
});
|
|
16375
16382
|
if (plistFiles.length > 0) infoPlistPaths = plistFiles.map((file) => `ios/${file}`);
|
|
16376
16383
|
} catch (error) {}
|
|
16384
|
+
let stringResourcePaths = [];
|
|
16385
|
+
try {
|
|
16386
|
+
const stringsFiles = fg.sync(path.join("**", "strings.xml"), {
|
|
16387
|
+
cwd: path.join(getCwd(), "android"),
|
|
16388
|
+
absolute: false,
|
|
16389
|
+
onlyFiles: true
|
|
16390
|
+
});
|
|
16391
|
+
if (stringsFiles.length > 0) stringResourcePaths = stringsFiles.map((file) => path.join("android", file));
|
|
16392
|
+
} catch (error) {}
|
|
16393
|
+
return {
|
|
16394
|
+
android: { stringResourcePaths },
|
|
16395
|
+
ios: { infoPlistPaths }
|
|
16396
|
+
};
|
|
16397
|
+
};
|
|
16398
|
+
const getDefaultConfig = () => {
|
|
16377
16399
|
return {
|
|
16378
16400
|
releaseChannel: "production",
|
|
16379
16401
|
updateStrategy: "fingerprint",
|
|
@@ -16382,10 +16404,7 @@ const getDefaultConfig = () => {
|
|
|
16382
16404
|
ignorePaths: []
|
|
16383
16405
|
},
|
|
16384
16406
|
console: { port: 1422 },
|
|
16385
|
-
platform:
|
|
16386
|
-
android: { stringResourcePaths: ["android/app/src/main/res/values/strings.xml"] },
|
|
16387
|
-
ios: { infoPlistPaths }
|
|
16388
|
-
},
|
|
16407
|
+
platform: getDefaultPlatformConfig(),
|
|
16389
16408
|
nativeBuild: { android: {
|
|
16390
16409
|
aab: true,
|
|
16391
16410
|
variant: "Release",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/plugin-core",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"cosmiconfig-typescript-loader": "5.0.0",
|
|
47
47
|
"fast-glob": "3.3.3",
|
|
48
48
|
"oxc-transform": "0.82.1",
|
|
49
|
-
"@hot-updater/core": "0.20.
|
|
49
|
+
"@hot-updater/core": "0.20.3"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/node": "^22.7.5",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"picocolors": "^1.0.0",
|
|
57
57
|
"typescript": "5.8.2",
|
|
58
58
|
"workspace-tools": "^0.36.4",
|
|
59
|
-
"@hot-updater/plugin-core": "0.20.
|
|
59
|
+
"@hot-updater/plugin-core": "0.20.3"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "tsdown",
|