@hot-updater/plugin-core 0.16.4 → 0.16.6

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.
@@ -0,0 +1,40 @@
1
+ export type BuildType = "bare" | "rnef";
2
+ export type ImportInfo = {
3
+ pkg: string;
4
+ named?: string[];
5
+ defaultOrNamespace?: string;
6
+ sideEffect?: boolean;
7
+ };
8
+ export type ProviderConfig = {
9
+ imports: ImportInfo[];
10
+ configString: string;
11
+ };
12
+ export interface IConfigBuilder {
13
+ /** Sets the build type ('bare' or 'rnef') and adds necessary build imports. */
14
+ setBuildType(buildType: BuildType): this;
15
+ /** Sets the storage configuration and adds its required imports. */
16
+ setStorage(storageConfig: ProviderConfig): this;
17
+ /** Sets the database configuration and adds its required imports. */
18
+ setDatabase(databaseConfig: ProviderConfig): this;
19
+ /** Sets the intermediate code block to be placed between imports and defineConfig. */
20
+ setIntermediateCode(code: string): this;
21
+ /** Assembles and returns the final configuration string. */
22
+ getResult(): string;
23
+ }
24
+ export declare class ConfigBuilder implements IConfigBuilder {
25
+ private buildType;
26
+ private storageInfo;
27
+ private databaseInfo;
28
+ private intermediateCode;
29
+ private collectedImports;
30
+ constructor();
31
+ addImport(info: ImportInfo): this;
32
+ private addImports;
33
+ private generateImportStatements;
34
+ private generateBuildConfigString;
35
+ setBuildType(buildType: BuildType): this;
36
+ setStorage(storageConfig: ProviderConfig): this;
37
+ setDatabase(databaseConfig: ProviderConfig): this;
38
+ setIntermediateCode(code: string): this;
39
+ getResult(): string;
40
+ }
@@ -0,0 +1 @@
1
+ export {};