@devlander/expo-app-config 0.0.76 → 0.0.82
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/cjs/index.js +1 -2
- package/dist/cjs/typings/__tests__/apply-relative-paths-to-config.test.d.ts +1 -0
- package/dist/cjs/typings/__tests__/create-bundle.test.d.ts +0 -1
- package/dist/cjs/typings/__tests__/format-assets-path.test.d.ts +1 -0
- package/dist/cjs/typings/__tests__/get-colors-for-environment.test.d.ts +0 -1
- package/dist/cjs/typings/__tests__/get-images-for-config.test.d.ts +0 -1
- package/dist/cjs/typings/__tests__/get-versions.test.d.ts +0 -1
- package/dist/cjs/typings/__tests__/tools.test.d.ts +1 -0
- package/dist/cjs/typings/apply-relative-paths-to-config.d.ts +9 -0
- package/dist/cjs/typings/create-bundle.d.ts +7 -3
- package/dist/cjs/typings/create-names-for-package.d.ts +0 -1
- package/dist/cjs/typings/format-assets-path.d.ts +2 -0
- package/dist/cjs/typings/get-app-images.d.ts +8 -0
- package/dist/cjs/typings/get-colors-for-environment.d.ts +0 -1
- package/dist/cjs/typings/get-images-for-config.d.ts +0 -1
- package/dist/cjs/typings/get-versions.d.ts +2 -3
- package/dist/cjs/typings/index.d.ts +0 -6
- package/dist/cjs/typings/setup-config.types.d.ts +4 -11
- package/dist/cjs/typings/tools.d.ts +17 -0
- package/dist/esm/index.js +1 -2
- package/dist/esm/typings/__tests__/apply-relative-paths-to-config.test.d.ts +1 -0
- package/dist/esm/typings/__tests__/create-bundle.test.d.ts +0 -1
- package/dist/esm/typings/__tests__/format-assets-path.test.d.ts +1 -0
- package/dist/esm/typings/__tests__/get-colors-for-environment.test.d.ts +0 -1
- package/dist/esm/typings/__tests__/get-images-for-config.test.d.ts +0 -1
- package/dist/esm/typings/__tests__/get-versions.test.d.ts +0 -1
- package/dist/esm/typings/__tests__/tools.test.d.ts +1 -0
- package/dist/esm/typings/apply-relative-paths-to-config.d.ts +9 -0
- package/dist/esm/typings/create-bundle.d.ts +7 -3
- package/dist/esm/typings/create-names-for-package.d.ts +0 -1
- package/dist/esm/typings/format-assets-path.d.ts +2 -0
- package/dist/esm/typings/get-app-images.d.ts +8 -0
- package/dist/esm/typings/get-colors-for-environment.d.ts +0 -1
- package/dist/esm/typings/get-images-for-config.d.ts +0 -1
- package/dist/esm/typings/get-versions.d.ts +2 -3
- package/dist/esm/typings/index.d.ts +0 -6
- package/dist/esm/typings/setup-config.types.d.ts +4 -11
- package/dist/esm/typings/tools.d.ts +17 -0
- package/dist/umd/index.js +1 -0
- package/dist/umd/typings/__tests__/apply-relative-paths-to-config.test.d.ts +1 -0
- package/dist/umd/typings/__tests__/create-bundle.test.d.ts +1 -0
- package/dist/umd/typings/__tests__/format-assets-path.test.d.ts +1 -0
- package/dist/umd/typings/__tests__/get-colors-for-environment.test.d.ts +1 -0
- package/dist/umd/typings/__tests__/get-images-for-config.test.d.ts +1 -0
- package/dist/umd/typings/__tests__/get-versions.test.d.ts +1 -0
- package/dist/umd/typings/__tests__/tools.test.d.ts +1 -0
- package/dist/umd/typings/apply-relative-paths-to-config.d.ts +9 -0
- package/dist/umd/typings/create-bundle.d.ts +7 -0
- package/dist/umd/typings/create-names-for-package.d.ts +8 -0
- package/dist/umd/typings/format-assets-path.d.ts +2 -0
- package/dist/umd/typings/get-app-images.d.ts +8 -0
- package/dist/umd/typings/get-colors-for-environment.d.ts +2 -0
- package/dist/umd/typings/get-images-for-config.d.ts +15 -0
- package/dist/umd/typings/get-versions.d.ts +2 -0
- package/dist/umd/typings/index.d.ts +4 -0
- package/dist/umd/typings/setup-config.types.d.ts +145 -0
- package/dist/umd/typings/tools.d.ts +17 -0
- package/package.json +14 -8
- package/typings/__tests__/apply-relative-paths-to-config.test.d.ts +1 -0
- package/typings/__tests__/create-bundle.test.d.ts +0 -1
- package/typings/__tests__/format-assets-path.test.d.ts +1 -0
- package/typings/__tests__/get-colors-for-environment.test.d.ts +0 -1
- package/typings/__tests__/get-images-for-config.test.d.ts +0 -1
- package/typings/__tests__/get-versions.test.d.ts +0 -1
- package/typings/__tests__/tools.test.d.ts +1 -0
- package/typings/apply-relative-paths-to-config.d.ts +9 -0
- package/typings/create-bundle.d.ts +7 -3
- package/typings/create-names-for-package.d.ts +0 -1
- package/typings/format-assets-path.d.ts +2 -0
- package/typings/get-app-images.d.ts +8 -0
- package/typings/get-colors-for-environment.d.ts +0 -1
- package/typings/get-images-for-config.d.ts +0 -1
- package/typings/get-versions.d.ts +2 -3
- package/typings/index.d.ts +0 -6
- package/typings/setup-config.types.d.ts +4 -11
- package/typings/tools.d.ts +17 -0
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/typings/__tests__/create-bundle.test.d.ts.map +0 -1
- package/dist/cjs/typings/__tests__/get-colors-for-environment.test.d.ts.map +0 -1
- package/dist/cjs/typings/__tests__/get-images-for-config.test.d.ts.map +0 -1
- package/dist/cjs/typings/__tests__/get-versions.test.d.ts.map +0 -1
- package/dist/cjs/typings/create-bundle.d.ts.map +0 -1
- package/dist/cjs/typings/create-names-for-package.d.ts.map +0 -1
- package/dist/cjs/typings/get-colors-for-environment.d.ts.map +0 -1
- package/dist/cjs/typings/get-images-for-config.d.ts.map +0 -1
- package/dist/cjs/typings/get-versions.d.ts.map +0 -1
- package/dist/cjs/typings/index.d.ts.map +0 -1
- package/dist/cjs/typings/normalize-paths.d.ts +0 -6
- package/dist/cjs/typings/normalize-paths.d.ts.map +0 -1
- package/dist/cjs/typings/setup-config.types.d.ts.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/typings/__tests__/create-bundle.test.d.ts.map +0 -1
- package/dist/esm/typings/__tests__/get-colors-for-environment.test.d.ts.map +0 -1
- package/dist/esm/typings/__tests__/get-images-for-config.test.d.ts.map +0 -1
- package/dist/esm/typings/__tests__/get-versions.test.d.ts.map +0 -1
- package/dist/esm/typings/create-bundle.d.ts.map +0 -1
- package/dist/esm/typings/create-names-for-package.d.ts.map +0 -1
- package/dist/esm/typings/get-colors-for-environment.d.ts.map +0 -1
- package/dist/esm/typings/get-images-for-config.d.ts.map +0 -1
- package/dist/esm/typings/get-versions.d.ts.map +0 -1
- package/dist/esm/typings/index.d.ts.map +0 -1
- package/dist/esm/typings/normalize-paths.d.ts +0 -6
- package/dist/esm/typings/normalize-paths.d.ts.map +0 -1
- package/dist/esm/typings/setup-config.types.d.ts.map +0 -1
- package/typings/__tests__/create-bundle.test.d.ts.map +0 -1
- package/typings/__tests__/get-colors-for-environment.test.d.ts.map +0 -1
- package/typings/__tests__/get-images-for-config.test.d.ts.map +0 -1
- package/typings/__tests__/get-versions.test.d.ts.map +0 -1
- package/typings/create-bundle.d.ts.map +0 -1
- package/typings/create-names-for-package.d.ts.map +0 -1
- package/typings/get-colors-for-environment.d.ts.map +0 -1
- package/typings/get-images-for-config.d.ts.map +0 -1
- package/typings/get-versions.d.ts.map +0 -1
- package/typings/index.d.ts.map +0 -1
- package/typings/normalize-paths.d.ts +0 -6
- package/typings/normalize-paths.d.ts.map +0 -1
- package/typings/setup-config.types.d.ts.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0})
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EnvEumFromPackage=void 0;var e=require("./create-bundle"),r=require("./setup-config.types");Object.defineProperty(exports,"EnvEumFromPackage",{enumerable:!0,get:function(){return r.EnvEumFromPackage}}),exports.default=e.createBundle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively applies relative path conversion to all asset paths in a configuration object.
|
|
3
|
+
* This function iterates through each property of the object. If the property is a string
|
|
4
|
+
* containing '/assets', it converts it using `convertAbsolutePathToRelative`. If the property
|
|
5
|
+
* is an object or an array, it recursively applies the same logic to its properties or elements.
|
|
6
|
+
* @param {object} config - The configuration object to be processed.
|
|
7
|
+
* @param {string} [basePath=''] - The base path for recursion, used for nested objects.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyRelativePathsToConfig(config: any, basePath?: string): void;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import type { BundleConfig } from "./setup-config.types";
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { BundleConfig, PieceOfConfig } from "./setup-config.types";
|
|
2
|
+
interface PartialConfig extends Partial<PieceOfConfig> {
|
|
3
|
+
name: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const createBundle: (existingConfig: PartialConfig, bundleConfig: BundleConfig) => PieceOfConfig | any;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ColorsFromAssets, ImagesForEnvironment } from ".";
|
|
2
|
+
export declare const getSplash: (images: ImagesForEnvironment, colors: ColorsFromAssets) => {
|
|
3
|
+
image: string;
|
|
4
|
+
backgroundColor: string;
|
|
5
|
+
resizeMode?: "cover" | "contain";
|
|
6
|
+
};
|
|
7
|
+
export declare const getAppIcon: (images: ImagesForEnvironment) => string;
|
|
8
|
+
export declare const getAppBackgroundColor: (colors: ColorsFromAssets) => string;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getVersions: (env:
|
|
3
|
-
//# sourceMappingURL=get-versions.d.ts.map
|
|
1
|
+
import type { EnvType, EnvironmentConfig } from "./setup-config.types.js";
|
|
2
|
+
export declare const getVersions: (env: EnvType, versionsPath: string) => EnvironmentConfig;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { createBundle } from "./create-bundle";
|
|
2
|
-
export { createBundle } from "./create-bundle";
|
|
3
|
-
export { createNamesForPackage } from "./create-names-for-package";
|
|
4
|
-
export { getColorsForEnvironment } from "./get-colors-for-environment";
|
|
5
|
-
export { getImagesForEnvironment } from "./get-images-for-config";
|
|
6
2
|
export type { ImagesForEnvironment } from "./get-images-for-config";
|
|
7
|
-
export { getVersions } from "./get-versions";
|
|
8
3
|
export { AppConfigFromEnv, ColorsFromAssets, EnvEumFromPackage, ColorMode, BundleConfig, EnvType, ColorAppConfig, PieceOfConfig, AndroidVersion, SplashConfig, EnvironmentConfig, IOSVersion, } from "./setup-config.types";
|
|
9
4
|
export default createBundle;
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,13 +3,15 @@ export interface BundleConfig {
|
|
|
3
3
|
colorsPath: string;
|
|
4
4
|
envVariables: AppConfigFromEnv;
|
|
5
5
|
imagesPath: string;
|
|
6
|
-
rootFolder: string;
|
|
7
6
|
versionsPath: string;
|
|
8
7
|
projectId: string;
|
|
9
8
|
}
|
|
10
9
|
export interface AppConfigFromEnv {
|
|
11
10
|
environment: EnvType;
|
|
12
|
-
baseURL:
|
|
11
|
+
baseURL: {
|
|
12
|
+
native: string;
|
|
13
|
+
web: string;
|
|
14
|
+
};
|
|
13
15
|
branding: {
|
|
14
16
|
logoURL: string;
|
|
15
17
|
};
|
|
@@ -18,10 +20,6 @@ export interface AppConfigFromEnv {
|
|
|
18
20
|
primaryTagline: string;
|
|
19
21
|
secondaryTagline: string;
|
|
20
22
|
};
|
|
21
|
-
jwPlayer: {
|
|
22
|
-
playerKey: string;
|
|
23
|
-
playerSecret: string;
|
|
24
|
-
};
|
|
25
23
|
authentication: {
|
|
26
24
|
login: {
|
|
27
25
|
email: string;
|
|
@@ -38,10 +36,6 @@ export interface AppConfigFromEnv {
|
|
|
38
36
|
lastName: string;
|
|
39
37
|
};
|
|
40
38
|
};
|
|
41
|
-
stripeDetails: {
|
|
42
|
-
secretKey: string;
|
|
43
|
-
publishableKey: string;
|
|
44
|
-
};
|
|
45
39
|
apiKeys: {
|
|
46
40
|
[key: string]: string;
|
|
47
41
|
};
|
|
@@ -149,4 +143,3 @@ export interface PieceOfConfig extends Partial<any> {
|
|
|
149
143
|
};
|
|
150
144
|
extra?: ExtraConfig;
|
|
151
145
|
}
|
|
152
|
-
//# sourceMappingURL=setup-config.types.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AppConfigFromEnv, BundleConfig, PieceOfConfig } from ".";
|
|
2
|
+
export declare const writeConfigToJsonFile: (result: PieceOfConfig, environment: AppConfigFromEnv["environment"]) => void;
|
|
3
|
+
export declare const generateBundleConfigForEnvironment: (environment: AppConfigFromEnv["environment"]) => BundleConfig;
|
|
4
|
+
export declare const generateAppConfigForEnvironment: (appName: string, environment: AppConfigFromEnv["environment"]) => PieceOfConfig;
|
|
5
|
+
export declare const generateFaultyAppConfig: (name: string, slug: string) => PieceOfConfig;
|
|
6
|
+
export declare const productionConfig: BundleConfig;
|
|
7
|
+
export declare const stagingConfig: BundleConfig;
|
|
8
|
+
export declare const localConfig: BundleConfig;
|
|
9
|
+
export declare const developmentConfig: BundleConfig;
|
|
10
|
+
export declare const expoDevConfig: PieceOfConfig;
|
|
11
|
+
export declare const expoProductionConfig: PieceOfConfig;
|
|
12
|
+
export declare const expoStagingConfig: PieceOfConfig;
|
|
13
|
+
export declare const faultyConfig: PieceOfConfig;
|
|
14
|
+
export declare const productionResult: any;
|
|
15
|
+
export declare const stagingResult: any;
|
|
16
|
+
export declare const localResult: any;
|
|
17
|
+
export declare const developmentResult: any;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.EnvEumFromPackage=void 0;var e=require("./create-bundle"),r=require("./setup-config.types");Object.defineProperty(exports,"EnvEumFromPackage",{enumerable:!0,get:function(){return r.EnvEumFromPackage}}),exports.default=e.createBundle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively applies relative path conversion to all asset paths in a configuration object.
|
|
3
|
+
* This function iterates through each property of the object. If the property is a string
|
|
4
|
+
* containing '/assets', it converts it using `convertAbsolutePathToRelative`. If the property
|
|
5
|
+
* is an object or an array, it recursively applies the same logic to its properties or elements.
|
|
6
|
+
* @param {object} config - The configuration object to be processed.
|
|
7
|
+
* @param {string} [basePath=''] - The base path for recursion, used for nested objects.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyRelativePathsToConfig(config: any, basePath?: string): void;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import type { BundleConfig } from "./setup-config.types";
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { BundleConfig, PieceOfConfig } from "./setup-config.types";
|
|
2
|
+
interface PartialConfig extends Partial<PieceOfConfig> {
|
|
3
|
+
name: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const createBundle: (existingConfig: PartialConfig, bundleConfig: BundleConfig) => PieceOfConfig | any;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ColorsFromAssets, ImagesForEnvironment } from ".";
|
|
2
|
+
export declare const getSplash: (images: ImagesForEnvironment, colors: ColorsFromAssets) => {
|
|
3
|
+
image: string;
|
|
4
|
+
backgroundColor: string;
|
|
5
|
+
resizeMode?: "cover" | "contain";
|
|
6
|
+
};
|
|
7
|
+
export declare const getAppIcon: (images: ImagesForEnvironment) => string;
|
|
8
|
+
export declare const getAppBackgroundColor: (colors: ColorsFromAssets) => string;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getVersions: (env:
|
|
3
|
-
//# sourceMappingURL=get-versions.d.ts.map
|
|
1
|
+
import type { EnvType, EnvironmentConfig } from "./setup-config.types.js";
|
|
2
|
+
export declare const getVersions: (env: EnvType, versionsPath: string) => EnvironmentConfig;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { createBundle } from "./create-bundle";
|
|
2
|
-
export { createBundle } from "./create-bundle";
|
|
3
|
-
export { createNamesForPackage } from "./create-names-for-package";
|
|
4
|
-
export { getColorsForEnvironment } from "./get-colors-for-environment";
|
|
5
|
-
export { getImagesForEnvironment } from "./get-images-for-config";
|
|
6
2
|
export type { ImagesForEnvironment } from "./get-images-for-config";
|
|
7
|
-
export { getVersions } from "./get-versions";
|
|
8
3
|
export { AppConfigFromEnv, ColorsFromAssets, EnvEumFromPackage, ColorMode, BundleConfig, EnvType, ColorAppConfig, PieceOfConfig, AndroidVersion, SplashConfig, EnvironmentConfig, IOSVersion, } from "./setup-config.types";
|
|
9
4
|
export default createBundle;
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,13 +3,15 @@ export interface BundleConfig {
|
|
|
3
3
|
colorsPath: string;
|
|
4
4
|
envVariables: AppConfigFromEnv;
|
|
5
5
|
imagesPath: string;
|
|
6
|
-
rootFolder: string;
|
|
7
6
|
versionsPath: string;
|
|
8
7
|
projectId: string;
|
|
9
8
|
}
|
|
10
9
|
export interface AppConfigFromEnv {
|
|
11
10
|
environment: EnvType;
|
|
12
|
-
baseURL:
|
|
11
|
+
baseURL: {
|
|
12
|
+
native: string;
|
|
13
|
+
web: string;
|
|
14
|
+
};
|
|
13
15
|
branding: {
|
|
14
16
|
logoURL: string;
|
|
15
17
|
};
|
|
@@ -18,10 +20,6 @@ export interface AppConfigFromEnv {
|
|
|
18
20
|
primaryTagline: string;
|
|
19
21
|
secondaryTagline: string;
|
|
20
22
|
};
|
|
21
|
-
jwPlayer: {
|
|
22
|
-
playerKey: string;
|
|
23
|
-
playerSecret: string;
|
|
24
|
-
};
|
|
25
23
|
authentication: {
|
|
26
24
|
login: {
|
|
27
25
|
email: string;
|
|
@@ -38,10 +36,6 @@ export interface AppConfigFromEnv {
|
|
|
38
36
|
lastName: string;
|
|
39
37
|
};
|
|
40
38
|
};
|
|
41
|
-
stripeDetails: {
|
|
42
|
-
secretKey: string;
|
|
43
|
-
publishableKey: string;
|
|
44
|
-
};
|
|
45
39
|
apiKeys: {
|
|
46
40
|
[key: string]: string;
|
|
47
41
|
};
|
|
@@ -149,4 +143,3 @@ export interface PieceOfConfig extends Partial<any> {
|
|
|
149
143
|
};
|
|
150
144
|
extra?: ExtraConfig;
|
|
151
145
|
}
|
|
152
|
-
//# sourceMappingURL=setup-config.types.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AppConfigFromEnv, BundleConfig, PieceOfConfig } from ".";
|
|
2
|
+
export declare const writeConfigToJsonFile: (result: PieceOfConfig, environment: AppConfigFromEnv["environment"]) => void;
|
|
3
|
+
export declare const generateBundleConfigForEnvironment: (environment: AppConfigFromEnv["environment"]) => BundleConfig;
|
|
4
|
+
export declare const generateAppConfigForEnvironment: (appName: string, environment: AppConfigFromEnv["environment"]) => PieceOfConfig;
|
|
5
|
+
export declare const generateFaultyAppConfig: (name: string, slug: string) => PieceOfConfig;
|
|
6
|
+
export declare const productionConfig: BundleConfig;
|
|
7
|
+
export declare const stagingConfig: BundleConfig;
|
|
8
|
+
export declare const localConfig: BundleConfig;
|
|
9
|
+
export declare const developmentConfig: BundleConfig;
|
|
10
|
+
export declare const expoDevConfig: PieceOfConfig;
|
|
11
|
+
export declare const expoProductionConfig: PieceOfConfig;
|
|
12
|
+
export declare const expoStagingConfig: PieceOfConfig;
|
|
13
|
+
export declare const faultyConfig: PieceOfConfig;
|
|
14
|
+
export declare const productionResult: any;
|
|
15
|
+
export declare const stagingResult: any;
|
|
16
|
+
export declare const localResult: any;
|
|
17
|
+
export declare const developmentResult: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EnvEumFromPackage=void 0;var e=require("./create-bundle"),r=require("./setup-config.types");Object.defineProperty(exports,"EnvEumFromPackage",{enumerable:!0,get:function(){return r.EnvEumFromPackage}}),exports.default=e.createBundle}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively applies relative path conversion to all asset paths in a configuration object.
|
|
3
|
+
* This function iterates through each property of the object. If the property is a string
|
|
4
|
+
* containing '/assets', it converts it using `convertAbsolutePathToRelative`. If the property
|
|
5
|
+
* is an object or an array, it recursively applies the same logic to its properties or elements.
|
|
6
|
+
* @param {object} config - The configuration object to be processed.
|
|
7
|
+
* @param {string} [basePath=''] - The base path for recursion, used for nested objects.
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyRelativePathsToConfig(config: any, basePath?: string): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BundleConfig, PieceOfConfig } from "./setup-config.types";
|
|
2
|
+
interface PartialConfig extends Partial<PieceOfConfig> {
|
|
3
|
+
name: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const createBundle: (existingConfig: PartialConfig, bundleConfig: BundleConfig) => PieceOfConfig | any;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ColorsFromAssets, ImagesForEnvironment } from ".";
|
|
2
|
+
export declare const getSplash: (images: ImagesForEnvironment, colors: ColorsFromAssets) => {
|
|
3
|
+
image: string;
|
|
4
|
+
backgroundColor: string;
|
|
5
|
+
resizeMode?: "cover" | "contain";
|
|
6
|
+
};
|
|
7
|
+
export declare const getAppIcon: (images: ImagesForEnvironment) => string;
|
|
8
|
+
export declare const getAppBackgroundColor: (colors: ColorsFromAssets) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { EnvType } from "./setup-config.types.js";
|
|
2
|
+
export interface ImagesForEnvironment {
|
|
3
|
+
splashImage: string;
|
|
4
|
+
iconImage: string;
|
|
5
|
+
adaptiveIconImage: string;
|
|
6
|
+
faviconImage: string;
|
|
7
|
+
}
|
|
8
|
+
interface NameForImageType {
|
|
9
|
+
splashFileName: string;
|
|
10
|
+
iconFileName: string;
|
|
11
|
+
adaptiveFileName: string;
|
|
12
|
+
faviconFileName: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const getImagesForEnvironment: (env: EnvType, pathToCheck?: string, namesForImages?: NameForImageType) => ImagesForEnvironment;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createBundle } from "./create-bundle";
|
|
2
|
+
export type { ImagesForEnvironment } from "./get-images-for-config";
|
|
3
|
+
export { AppConfigFromEnv, ColorsFromAssets, EnvEumFromPackage, ColorMode, BundleConfig, EnvType, ColorAppConfig, PieceOfConfig, AndroidVersion, SplashConfig, EnvironmentConfig, IOSVersion, } from "./setup-config.types";
|
|
4
|
+
export default createBundle;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
export type ColorsFromAssets = ColorAppConfig & ColorConfig;
|
|
2
|
+
export interface BundleConfig {
|
|
3
|
+
colorsPath: string;
|
|
4
|
+
envVariables: AppConfigFromEnv;
|
|
5
|
+
imagesPath: string;
|
|
6
|
+
versionsPath: string;
|
|
7
|
+
projectId: string;
|
|
8
|
+
}
|
|
9
|
+
export interface AppConfigFromEnv {
|
|
10
|
+
environment: EnvType;
|
|
11
|
+
baseURL: {
|
|
12
|
+
native: string;
|
|
13
|
+
web: string;
|
|
14
|
+
};
|
|
15
|
+
branding: {
|
|
16
|
+
logoURL: string;
|
|
17
|
+
};
|
|
18
|
+
verbiage: {
|
|
19
|
+
displayName: string;
|
|
20
|
+
primaryTagline: string;
|
|
21
|
+
secondaryTagline: string;
|
|
22
|
+
};
|
|
23
|
+
authentication: {
|
|
24
|
+
login: {
|
|
25
|
+
email: string;
|
|
26
|
+
password: string;
|
|
27
|
+
phoneNumber: string;
|
|
28
|
+
firstName: string;
|
|
29
|
+
lastName: string;
|
|
30
|
+
};
|
|
31
|
+
register: {
|
|
32
|
+
email: string;
|
|
33
|
+
password: string;
|
|
34
|
+
phoneNumber: string;
|
|
35
|
+
firstName: string;
|
|
36
|
+
lastName: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
apiKeys: {
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface VersionsJSON {
|
|
44
|
+
production: EnvironmentConfig;
|
|
45
|
+
staging: EnvironmentConfig;
|
|
46
|
+
development: EnvironmentConfig;
|
|
47
|
+
}
|
|
48
|
+
export interface AndroidVersion {
|
|
49
|
+
versionCode: number;
|
|
50
|
+
}
|
|
51
|
+
export interface IOSVersion {
|
|
52
|
+
buildNumber: string;
|
|
53
|
+
}
|
|
54
|
+
export interface AppVersion {
|
|
55
|
+
version: string;
|
|
56
|
+
}
|
|
57
|
+
export interface EnvironmentConfig {
|
|
58
|
+
ios: IOSVersion;
|
|
59
|
+
android: AndroidVersion;
|
|
60
|
+
app: AppVersion;
|
|
61
|
+
}
|
|
62
|
+
export declare enum EnvEumFromPackage {
|
|
63
|
+
production = "production",
|
|
64
|
+
staging = "staging",
|
|
65
|
+
development = "development",
|
|
66
|
+
local = "local"
|
|
67
|
+
}
|
|
68
|
+
export type EnvType = "production" | "staging" | "development" | "local" | EnvEumFromPackage;
|
|
69
|
+
export interface ColorMode {
|
|
70
|
+
light: string;
|
|
71
|
+
dark?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface SplashConfig {
|
|
74
|
+
backgroundColor: ColorMode;
|
|
75
|
+
}
|
|
76
|
+
export interface AdaptiveIconConfig {
|
|
77
|
+
backgroundColor: ColorMode;
|
|
78
|
+
}
|
|
79
|
+
export interface StatusBarConfig {
|
|
80
|
+
backgroundColor: ColorMode;
|
|
81
|
+
}
|
|
82
|
+
export interface NavigationBarConfig {
|
|
83
|
+
backgroundColor: ColorMode;
|
|
84
|
+
}
|
|
85
|
+
export interface ColorConfig {
|
|
86
|
+
statusBar: StatusBarConfig;
|
|
87
|
+
navigationBar: NavigationBarConfig;
|
|
88
|
+
primaryColor: ColorMode;
|
|
89
|
+
}
|
|
90
|
+
export interface ColorAppConfig {
|
|
91
|
+
splash: SplashConfig;
|
|
92
|
+
adaptiveIcon: AdaptiveIconConfig;
|
|
93
|
+
iconColor: ColorMode;
|
|
94
|
+
themeColor: string;
|
|
95
|
+
}
|
|
96
|
+
export interface ExtraConfig {
|
|
97
|
+
eas: {
|
|
98
|
+
projectId: string;
|
|
99
|
+
};
|
|
100
|
+
env: AppConfigFromEnv;
|
|
101
|
+
}
|
|
102
|
+
export interface PieceOfConfig extends Partial<any> {
|
|
103
|
+
name: string;
|
|
104
|
+
slug: string;
|
|
105
|
+
version: string;
|
|
106
|
+
icon: string;
|
|
107
|
+
scheme: string;
|
|
108
|
+
android: {
|
|
109
|
+
package: string;
|
|
110
|
+
versionCode: number;
|
|
111
|
+
backgroundColor: string;
|
|
112
|
+
splash: {
|
|
113
|
+
image: string;
|
|
114
|
+
backgroundColor: string;
|
|
115
|
+
resizeMode?: "cover" | "contain";
|
|
116
|
+
};
|
|
117
|
+
adaptiveIcon: {
|
|
118
|
+
foregroundImage: string;
|
|
119
|
+
};
|
|
120
|
+
icon: string;
|
|
121
|
+
};
|
|
122
|
+
web: {
|
|
123
|
+
backgroundColor: string;
|
|
124
|
+
splash: {
|
|
125
|
+
image: string;
|
|
126
|
+
backgroundColor: string;
|
|
127
|
+
resizeMode?: "cover" | "contain";
|
|
128
|
+
};
|
|
129
|
+
shortName: string;
|
|
130
|
+
favicon: string;
|
|
131
|
+
themeColor: string;
|
|
132
|
+
};
|
|
133
|
+
ios: {
|
|
134
|
+
bundleIdentifier: string;
|
|
135
|
+
backgroundColor: string;
|
|
136
|
+
buildNumber: string;
|
|
137
|
+
splash: {
|
|
138
|
+
image: string;
|
|
139
|
+
resizeMode?: "cover" | "contain";
|
|
140
|
+
backgroundColor: string;
|
|
141
|
+
};
|
|
142
|
+
icon: string;
|
|
143
|
+
};
|
|
144
|
+
extra?: ExtraConfig;
|
|
145
|
+
}
|