@hot-updater/plugin-core 0.12.2 → 0.12.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 +2 -1
- package/dist/index.js +2 -1
- package/dist/loadConfig.d.ts +5 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -119,7 +119,7 @@ var __webpack_exports__ = {};
|
|
|
119
119
|
const getCwd = ()=>(0, external_workspace_tools_namespaceObject.findPackageRoot)(process.cwd());
|
|
120
120
|
const external_cosmiconfig_namespaceObject = require("cosmiconfig");
|
|
121
121
|
const external_cosmiconfig_typescript_loader_namespaceObject = require("cosmiconfig-typescript-loader");
|
|
122
|
-
const loadConfig = async ()=>{
|
|
122
|
+
const loadConfig = async (options)=>{
|
|
123
123
|
const result = await (0, external_cosmiconfig_namespaceObject.cosmiconfig)("hot-updater", {
|
|
124
124
|
stopDir: getCwd(),
|
|
125
125
|
searchPlaces: [
|
|
@@ -138,6 +138,7 @@ var __webpack_exports__ = {};
|
|
|
138
138
|
}
|
|
139
139
|
}).search();
|
|
140
140
|
if (!result?.config) return null;
|
|
141
|
+
if ("function" == typeof result.config) return await result.config(options);
|
|
141
142
|
return result.config;
|
|
142
143
|
};
|
|
143
144
|
const external_path_namespaceObject = require("path");
|
package/dist/index.js
CHANGED
|
@@ -101,7 +101,7 @@ const log = {
|
|
|
101
101
|
debug: (message)=>console.log(picocolors_default().gray(message))
|
|
102
102
|
};
|
|
103
103
|
const getCwd = ()=>(0, __WEBPACK_EXTERNAL_MODULE_workspace_tools_2c254f81__.findPackageRoot)(process.cwd());
|
|
104
|
-
const loadConfig = async ()=>{
|
|
104
|
+
const loadConfig = async (options)=>{
|
|
105
105
|
const result = await (0, __WEBPACK_EXTERNAL_MODULE_cosmiconfig__.cosmiconfig)("hot-updater", {
|
|
106
106
|
stopDir: getCwd(),
|
|
107
107
|
searchPlaces: [
|
|
@@ -120,6 +120,7 @@ const loadConfig = async ()=>{
|
|
|
120
120
|
}
|
|
121
121
|
}).search();
|
|
122
122
|
if (!result?.config) return null;
|
|
123
|
+
if ("function" == typeof result.config) return await result.config(options);
|
|
123
124
|
return result.config;
|
|
124
125
|
};
|
|
125
126
|
const copyDirToTmp = async (dir)=>{
|
package/dist/loadConfig.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import type { Config } from "./types.js";
|
|
2
|
-
export
|
|
1
|
+
import type { Config, Platform } from "./types.js";
|
|
2
|
+
export interface HotUpdaterConfigOptions {
|
|
3
|
+
platform: Platform | "console";
|
|
4
|
+
}
|
|
5
|
+
export declare const loadConfig: (options: HotUpdaterConfigOptions) => Promise<Config | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/plugin-core",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@hot-updater/core": "0.12.
|
|
41
|
+
"@hot-updater/core": "0.12.3",
|
|
42
42
|
"cosmiconfig": "^9.0.0",
|
|
43
43
|
"cosmiconfig-typescript-loader": "^5.0.0",
|
|
44
44
|
"workspace-tools": "^0.36.4"
|