@callstack/react-native-brownfield 5.1.1 → 5.3.0
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/CHANGELOG.md +25 -0
- package/gradle-plugin/brownfield/build.gradle.kts +67 -2
- package/gradle-plugin/brownfield/gradle/libs.versions.toml +5 -2
- package/gradle-plugin/brownfield/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/gradle-plugin/brownfield/gradle.properties +1 -1
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RNBrownfieldPlugin.kt +35 -4
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/plugin/RNSourceSets.kt +6 -1
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/shared/MergeClassesTask.kt +2 -0
- package/gradle-plugin/brownfield/src/main/kotlin/com/callstack/react/brownfield/utils/Extension.kt +2 -2
- package/gradle-plugin/brownfield/src/test/kotlin/com/callstack/react/brownfield/plugin/AgpCompatibilityMatrixTest.kt +155 -0
- package/lib/commonjs/expo-config-plugin/android/utils/constants.js +1 -1
- package/lib/commonjs/expo-config-plugin/android/withAndroidModuleFiles.js +1 -1
- package/lib/commonjs/expo-config-plugin/android/withAndroidModuleFiles.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/ios/podfileHelpers.js +1 -1
- package/lib/commonjs/expo-config-plugin/ios/podfileHelpers.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/ios/withBrownfieldIos.js +1 -1
- package/lib/commonjs/expo-config-plugin/ios/withBrownfieldIos.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/ios/withIosFrameworkFiles.js +1 -1
- package/lib/commonjs/expo-config-plugin/ios/withIosFrameworkFiles.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/ios/xcodeHelpers.js +2 -2
- package/lib/commonjs/expo-config-plugin/ios/xcodeHelpers.js.map +1 -1
- package/lib/commonjs/expo-config-plugin/template/android/ReactNativeHostManager.vanilla.kt +35 -0
- package/lib/commonjs/expo-config-plugin/template/android/build.gradle.kts +1 -2
- package/lib/commonjs/expo-config-plugin/template/android/proguard-rules.pro +1 -1
- package/lib/commonjs/expo-config-plugin/template/ios/FrameworkInterface.vanilla.swift +12 -0
- package/lib/commonjs/expo-config-plugin/template/ios/PodfileTargetBlock.vanilla.rb +5 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/scaffold/index.js +2 -0
- package/lib/commonjs/scaffold/index.js.map +1 -0
- package/lib/commonjs/scaffold/projectFiles.js +2 -0
- package/lib/commonjs/scaffold/projectFiles.js.map +1 -0
- package/lib/commonjs/scaffold/xcode.d.js +2 -0
- package/lib/commonjs/scaffold/xcode.d.js.map +1 -0
- package/lib/module/expo-config-plugin/android/utils/constants.js +1 -1
- package/lib/module/expo-config-plugin/android/withAndroidModuleFiles.js +1 -1
- package/lib/module/expo-config-plugin/android/withAndroidModuleFiles.js.map +1 -1
- package/lib/module/expo-config-plugin/ios/podfileHelpers.js +1 -1
- package/lib/module/expo-config-plugin/ios/podfileHelpers.js.map +1 -1
- package/lib/module/expo-config-plugin/ios/withBrownfieldIos.js +1 -1
- package/lib/module/expo-config-plugin/ios/withBrownfieldIos.js.map +1 -1
- package/lib/module/expo-config-plugin/ios/withIosFrameworkFiles.js +1 -1
- package/lib/module/expo-config-plugin/ios/withIosFrameworkFiles.js.map +1 -1
- package/lib/module/expo-config-plugin/ios/xcodeHelpers.js +2 -2
- package/lib/module/expo-config-plugin/ios/xcodeHelpers.js.map +1 -1
- package/lib/module/expo-config-plugin/template/android/ReactNativeHostManager.vanilla.kt +35 -0
- package/lib/module/expo-config-plugin/template/android/build.gradle.kts +1 -2
- package/lib/module/expo-config-plugin/template/android/proguard-rules.pro +1 -1
- package/lib/module/expo-config-plugin/template/ios/FrameworkInterface.vanilla.swift +12 -0
- package/lib/module/expo-config-plugin/template/ios/PodfileTargetBlock.vanilla.rb +5 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/scaffold/index.js +2 -0
- package/lib/module/scaffold/index.js.map +1 -0
- package/lib/module/scaffold/projectFiles.js +2 -0
- package/lib/module/scaffold/projectFiles.js.map +1 -0
- package/lib/module/scaffold/xcode.d.js +2 -0
- package/lib/module/scaffold/xcode.d.js.map +1 -0
- package/lib/typescript/commonjs/src/expo-config-plugin/android/utils/constants.d.ts +2 -2
- package/lib/typescript/commonjs/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts +19 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/podfileHelpers.d.ts +4 -2
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/podfileHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/withBrownfieldIos.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/withIosFrameworkFiles.d.ts +11 -2
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/withIosFrameworkFiles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/xcodeHelpers.d.ts +6 -2
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/xcodeHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts +3 -2
- package/lib/typescript/commonjs/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/scaffold/index.d.ts +23 -0
- package/lib/typescript/commonjs/src/scaffold/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/scaffold/projectFiles.d.ts +63 -0
- package/lib/typescript/commonjs/src/scaffold/projectFiles.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-config-plugin/android/utils/constants.d.ts +2 -2
- package/lib/typescript/module/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts +19 -1
- package/lib/typescript/module/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/ios/podfileHelpers.d.ts +4 -2
- package/lib/typescript/module/src/expo-config-plugin/ios/podfileHelpers.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/ios/withBrownfieldIos.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/ios/withIosFrameworkFiles.d.ts +11 -2
- package/lib/typescript/module/src/expo-config-plugin/ios/withIosFrameworkFiles.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/ios/xcodeHelpers.d.ts +6 -2
- package/lib/typescript/module/src/expo-config-plugin/ios/xcodeHelpers.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts +3 -2
- package/lib/typescript/module/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/scaffold/index.d.ts +23 -0
- package/lib/typescript/module/src/scaffold/index.d.ts.map +1 -0
- package/lib/typescript/module/src/scaffold/projectFiles.d.ts +63 -0
- package/lib/typescript/module/src/scaffold/projectFiles.d.ts.map +1 -0
- package/package.json +16 -2
- package/src/expo-config-plugin/android/utils/constants.ts +1 -1
- package/src/expo-config-plugin/android/withAndroidModuleFiles.ts +62 -5
- package/src/expo-config-plugin/ios/podfileHelpers.ts +24 -6
- package/src/expo-config-plugin/ios/withBrownfieldIos.ts +5 -2
- package/src/expo-config-plugin/ios/withIosFrameworkFiles.ts +21 -6
- package/src/expo-config-plugin/ios/xcodeHelpers.ts +77 -5
- package/src/expo-config-plugin/template/android/ReactNativeHostManager.vanilla.kt +35 -0
- package/src/expo-config-plugin/template/android/build.gradle.kts +1 -2
- package/src/expo-config-plugin/template/android/proguard-rules.pro +1 -1
- package/src/expo-config-plugin/template/ios/FrameworkInterface.vanilla.swift +12 -0
- package/src/expo-config-plugin/template/ios/PodfileTargetBlock.vanilla.rb +5 -0
- package/src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts +3 -2
- package/src/index.ts +7 -0
- package/src/scaffold/index.ts +395 -0
- package/src/scaffold/projectFiles.ts +243 -0
- package/src/scaffold/xcode.d.ts +4 -0
|
@@ -5,13 +5,22 @@ import type { RenderedTemplateFile, ResolvedBrownfieldPluginConfigWithIos } from
|
|
|
5
5
|
* @param ios The iOS Brownfield plugin configuration
|
|
6
6
|
* @returns The list of framework source files
|
|
7
7
|
*/
|
|
8
|
-
export declare function getFrameworkSourceFiles(ios: ResolvedBrownfieldPluginConfigWithIos['ios']
|
|
8
|
+
export declare function getFrameworkSourceFiles(ios: ResolvedBrownfieldPluginConfigWithIos['ios'], options?: {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the packaged framework is expected to use the Expo host.
|
|
11
|
+
* This influences template selection for the generated framework sources.
|
|
12
|
+
* Note: expresses the same Expo-vs-vanilla axis as `templateVariant` in
|
|
13
|
+
* the Android helper (withAndroidModuleFiles.createAndroidModule), with
|
|
14
|
+
* opposite polarity: `false` here === 'vanilla' there.
|
|
15
|
+
*/
|
|
16
|
+
useExpoHost?: boolean;
|
|
17
|
+
}): RenderedTemplateFile[];
|
|
9
18
|
/**
|
|
10
19
|
* Creates the iOS framework directory structure and files
|
|
11
20
|
* @param iosDir The root iOS directory path
|
|
12
21
|
* @param config The resolved Brownfield plugin configuration
|
|
13
22
|
*/
|
|
14
|
-
export declare function createIosFramework(iosDir: string, config: ResolvedBrownfieldPluginConfigWithIos): void;
|
|
23
|
+
export declare function createIosFramework(iosDir: string, config: ResolvedBrownfieldPluginConfigWithIos, options?: Parameters<typeof getFrameworkSourceFiles>[1]): void;
|
|
15
24
|
/**
|
|
16
25
|
* Dangerous mod that creates the iOS framework directory and files
|
|
17
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withIosFrameworkFiles.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/withIosFrameworkFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EACV,oBAAoB,EACpB,qCAAqC,EACtC,MAAM,UAAU,CAAC;AAIlB;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,qCAAqC,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"withIosFrameworkFiles.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/withIosFrameworkFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EACV,oBAAoB,EACpB,qCAAqC,EACtC,MAAM,UAAU,CAAC;AAIlB;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,qCAAqC,CAAC,KAAK,CAAC,EACjD,OAAO,CAAC,EAAE;IACR;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACA,oBAAoB,EAAE,CAmBxB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,qCAAqC,EAC7C,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC,QA6BxD;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAC9C,qCAAqC,CAYtC,CAAC"}
|
|
@@ -6,11 +6,15 @@ import type { ResolvedBrownfieldPluginIosConfig } from '../types';
|
|
|
6
6
|
* @param project The Xcode project to modify
|
|
7
7
|
* @param options Framework target options
|
|
8
8
|
*/
|
|
9
|
-
export declare function addFrameworkTarget(project: XcodeProject, modRequest: ModProps<XcodeProject>, options: ResolvedBrownfieldPluginIosConfig
|
|
9
|
+
export declare function addFrameworkTarget(project: XcodeProject, modRequest: ModProps<XcodeProject>, options: ResolvedBrownfieldPluginIosConfig, brownfieldOptions?: {
|
|
10
|
+
useExpoHost?: boolean;
|
|
11
|
+
}): {
|
|
10
12
|
frameworkTargetUUID: string;
|
|
11
13
|
targetAlreadyExists: boolean;
|
|
12
14
|
};
|
|
13
|
-
export declare function addSourceFilesBuildPhase(project: XcodeProject, frameworkTargetUUID: string, options: ResolvedBrownfieldPluginIosConfig
|
|
15
|
+
export declare function addSourceFilesBuildPhase(project: XcodeProject, frameworkTargetUUID: string, options: ResolvedBrownfieldPluginIosConfig, brownfieldOptions?: {
|
|
16
|
+
useExpoHost?: boolean;
|
|
17
|
+
}): void;
|
|
14
18
|
export type PbxReferenceLike = {
|
|
15
19
|
value?: string;
|
|
16
20
|
comment?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xcodeHelpers.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/xcodeHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"xcodeHelpers.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/xcodeHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAC;AAyClE;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,QAAQ,CAAC,YAAY,CAAC,EAClC,OAAO,EAAE,iCAAiC,EAC1C,iBAAiB,CAAC,EAAE;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACA;IACD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE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EAAE,0BAA0B,EAAE,gBAAgB,EAAE,EAAE,0BAA0B,GAC3E,OAAO,CAwBT;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,EACE,aAAa,GACd,EAAE;IACD,sDAAsD;IACtD,aAAa,EAAE,OAAO,GAAG,SAAS,CAAC;CACpC,EACD,EACE,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAChB,aAAa,EAAE,mBAAmB,GACnC,EAAE,iCAAiC,GACnC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,CA8B3C;AAED,wBAAgB,qDAAqD,CACnE,WAAW,EAAE,MAAM,GAClB,MAAM,CAoCR;AAgCD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,MAAM,GACjB,IAAI,CAsGN;AAuED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,kBAAkB,CAAC,EAC/C,aAAa,EAAE,MAAM,GAAG,IAAI,GAC3B,MAAM,GAAG,IAAI,CAqBf;AAED,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,QAAQ,CAAC,YAAY,CAAC,EAClC,EACE,wBAAwB,GACzB,EAAE;IACD,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC,GACA,MAAM,CAYR"}
|
|
@@ -18,13 +18,14 @@ export interface BrownfieldPluginAndroidConfig {
|
|
|
18
18
|
*/
|
|
19
19
|
minSdkVersion?: number;
|
|
20
20
|
/**
|
|
21
|
-
* Target SDK version for the Android library
|
|
21
|
+
* Target SDK version for the Android library.
|
|
22
|
+
* Used on Expo SDK versions below 58; ignored on 58 and later.
|
|
22
23
|
* @default inherited from the generated Expo app project when available
|
|
23
24
|
*/
|
|
24
25
|
targetSdkVersion?: number;
|
|
25
26
|
/**
|
|
26
27
|
* Compile SDK version for the Android library
|
|
27
|
-
* @default
|
|
28
|
+
* @default 37 on Expo SDK 58 and later, otherwise 35
|
|
28
29
|
*/
|
|
29
30
|
compileSdkVersion?: number;
|
|
30
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrownfieldPluginAndroidConfig.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB
|
|
1
|
+
{"version":3,"file":"BrownfieldPluginAndroidConfig.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,QAAQ,CAC1D,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,GAAG,kBAAkB,CAAC,CAC9E,GACC,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,GAAG,kBAAkB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAWA,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;CACf;AAED,QAAA,MAAM,qBAAqB;IACzB;;;;;;OAMG;6BACsB,OAAO,KAAG,IAAI;IAUvC;;;;;;;OAOG;oDAC6C,OAAO,KAAG,IAAI;IAU9D;;;;;;;;;OASG;wBACiB,OAAO,KAAG,IAAI;IAKlC;;;;;;;;;;;;OAYG;0BAES,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,KACtC;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE;CAY1B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type BrownfieldScaffoldOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* React Native project root directory (contains package.json).
|
|
4
|
+
* Defaults to current working directory.
|
|
5
|
+
*/
|
|
6
|
+
projectRoot?: string;
|
|
7
|
+
/**
|
|
8
|
+
* iOS framework target name (also framework directory name).
|
|
9
|
+
* Defaults to "BrownfieldLib".
|
|
10
|
+
*/
|
|
11
|
+
iosFrameworkName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Android library module folder / Gradle module name.
|
|
14
|
+
* Defaults to "brownfieldlib".
|
|
15
|
+
*/
|
|
16
|
+
androidModuleName?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Enables verbose logging.
|
|
19
|
+
*/
|
|
20
|
+
debug?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function scaffoldBrownfieldInRncCliProject(options?: BrownfieldScaffoldOptions): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/scaffold/index.ts"],"names":[],"mappings":"AA8CA,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAoGF,wBAAsB,iCAAiC,CACrD,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,IAAI,CAAC,CA+Nf"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const BROWNFIELD_RUNTIME_PACKAGE_NAME = "@callstack/react-native-brownfield";
|
|
2
|
+
export declare const BROWNFIELD_CLI_PACKAGE_NAME = "@callstack/brownfield-cli";
|
|
3
|
+
/**
|
|
4
|
+
* Match the docs convention (getting-started/quick-start + expo.mdx): both
|
|
5
|
+
* packages are regular dependencies. The brownfield CLI ships as a dependency
|
|
6
|
+
* of the runtime package, so a consistent caret range pinned to this package's
|
|
7
|
+
* own published version keeps the two in lockstep (they are released together).
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveBrownfieldPackageVersionRange(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Adds @callstack/react-native-brownfield (the Kotlin/Swift host code the
|
|
12
|
+
* scaffolded module imports) and @callstack/brownfield-cli (the `brownfield`
|
|
13
|
+
* bin used by the package:* scripts) to the app's dependencies.
|
|
14
|
+
* Existing declarations are never overwritten. Returns the names added.
|
|
15
|
+
*/
|
|
16
|
+
export declare function addBrownfieldDependencies(projectRoot: string): string[];
|
|
17
|
+
/**
|
|
18
|
+
* Adds the `package:ios` / `package:android` scripts from the docs' manual
|
|
19
|
+
* steps (settings come from the generated brownfield.config.json, so no flags
|
|
20
|
+
* are duplicated here). Existing scripts with the same names are kept.
|
|
21
|
+
*/
|
|
22
|
+
export declare function addBrownfieldPackageScripts(projectRoot: string): string[];
|
|
23
|
+
export type BrownfieldFileConfig = {
|
|
24
|
+
$schema: string;
|
|
25
|
+
ios: {
|
|
26
|
+
scheme: string;
|
|
27
|
+
configuration: string;
|
|
28
|
+
};
|
|
29
|
+
android: {
|
|
30
|
+
moduleName: string;
|
|
31
|
+
variant: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Builds the brownfield.config.json content for the scaffolded targets,
|
|
36
|
+
* matching the manual steps in docs getting-started/ios.mdx (step 5) and
|
|
37
|
+
* android.mdx (step 7) and the CLI config schema (packages/cli/src/types.ts,
|
|
38
|
+
* strict additionalProperties: false).
|
|
39
|
+
*
|
|
40
|
+
* Idempotency strategy: the content is derived deterministically from the
|
|
41
|
+
* scaffolded project state (framework/module names), so re-running the
|
|
42
|
+
* scaffold overwrites with byte-identical content. Users customizing it are
|
|
43
|
+
* taking over responsibility; a re-scaffold with the same names is a no-op.
|
|
44
|
+
*/
|
|
45
|
+
export declare function createBrownfieldFileConfig({ iosFrameworkName, androidModuleName, }: {
|
|
46
|
+
iosFrameworkName: string;
|
|
47
|
+
androidModuleName: string;
|
|
48
|
+
}): BrownfieldFileConfig;
|
|
49
|
+
/**
|
|
50
|
+
* Writes brownfield.config.json at the project root. Deterministic output:
|
|
51
|
+
* same inputs -> same bytes, so re-running the scaffold never duplicates or
|
|
52
|
+
* drifts the file.
|
|
53
|
+
*
|
|
54
|
+
* Skips writing (returns null) when another Brownfield config source already
|
|
55
|
+
* exists: packages/cli loadBrownfieldConfig fails hard on multiple config
|
|
56
|
+
* files, so an existing brownfield.config.js or a legacy `brownfield` key in
|
|
57
|
+
* package.json takes precedence over generating a JSON one.
|
|
58
|
+
*/
|
|
59
|
+
export declare function writeBrownfieldFileConfig(projectRoot: string, names: {
|
|
60
|
+
iosFrameworkName: string;
|
|
61
|
+
androidModuleName: string;
|
|
62
|
+
}): string | null;
|
|
63
|
+
//# sourceMappingURL=projectFiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectFiles.d.ts","sourceRoot":"","sources":["../../../../../src/scaffold/projectFiles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,+BAA+B,uCACN,CAAC;AACvC,eAAO,MAAM,2BAA2B,8BAA8B,CAAC;AAEvE;;;;;GAKG;AACH,wBAAgB,oCAAoC,IAAI,MAAM,CAE7D;AA4ED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAmBvE;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAsBzE;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE;QACH,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,OAAO,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,gBAAgB,EAChB,iBAAiB,GAClB,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GAAG,oBAAoB,CAcvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE;IAAE,gBAAgB,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,GAC7D,MAAM,GAAG,IAAI,CAmCf"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const BROWNFIELD_PLUGIN_VERSION = "2.0.0-
|
|
2
|
-
export declare const brownfieldGradlePluginDependency = "classpath(\"com.callstack.react:brownfield-gradle-plugin:2.0.0-
|
|
1
|
+
export declare const BROWNFIELD_PLUGIN_VERSION = "2.0.0-alpha10";
|
|
2
|
+
export declare const brownfieldGradlePluginDependency = "classpath(\"com.callstack.react:brownfield-gradle-plugin:2.0.0-alpha10\")";
|
|
3
3
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
import { type ConfigPlugin } from '@expo/config-plugins';
|
|
2
2
|
import type { ResolvedBrownfieldPluginConfigWithAndroid } from '../types';
|
|
3
3
|
import { type AndroidManifestMetaDataEntry, type AndroidStringResourceEntry } from './utils/androidManifest';
|
|
4
|
+
/**
|
|
5
|
+
* Expo SDK 58+ Android library modules should not set `targetSdk`.
|
|
6
|
+
* Keep emitting it for older SDKs that still require the field.
|
|
7
|
+
*/
|
|
8
|
+
export declare const EXPO_SDK_OMIT_TARGET_SDK_FROM_MAJOR = 58;
|
|
4
9
|
export declare function resolveCompileSdkVersionExpression(config: ResolvedBrownfieldPluginConfigWithAndroid): string;
|
|
5
10
|
export declare function resolveTargetSdkVersionExpression(config: ResolvedBrownfieldPluginConfigWithAndroid): string;
|
|
11
|
+
export declare function renderTargetSdkBlock(config: ResolvedBrownfieldPluginConfigWithAndroid, expoMajor?: number, templateVariant?: 'expo' | 'vanilla'): string;
|
|
6
12
|
/**
|
|
7
13
|
* Creates the Android library module directory structure and files
|
|
8
14
|
*/
|
|
9
|
-
export declare function createAndroidModule({ androidDir, config, rnVersion, projectRoot, }: {
|
|
15
|
+
export declare function createAndroidModule({ androidDir, config, rnVersion, projectRoot, expoMajor, templateVariant, }: {
|
|
10
16
|
/**
|
|
11
17
|
* Expo app root (used to detect optional dependencies such as expo-updates)
|
|
12
18
|
*/
|
|
13
19
|
projectRoot?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Source template flavor. 'vanilla' is used by the RN CLI scaffold for
|
|
22
|
+
* non-Expo projects; Expo keeps the default 'expo' variant.
|
|
23
|
+
* Note: expresses the same Expo-vs-vanilla axis as `useExpoHost` in the
|
|
24
|
+
* iOS helpers (withIosFrameworkFiles/xcodeHelpers), with opposite
|
|
25
|
+
* polarity: 'vanilla' here === `useExpoHost: false` there.
|
|
26
|
+
*/
|
|
27
|
+
templateVariant?: 'expo' | 'vanilla';
|
|
14
28
|
/**
|
|
15
29
|
* The root Android directory path
|
|
16
30
|
*/
|
|
@@ -19,6 +33,10 @@ export declare function createAndroidModule({ androidDir, config, rnVersion, pro
|
|
|
19
33
|
* The resolved RN version
|
|
20
34
|
*/
|
|
21
35
|
rnVersion: string;
|
|
36
|
+
/**
|
|
37
|
+
* Expo SDK major version used to gate Android library `targetSdk`.
|
|
38
|
+
*/
|
|
39
|
+
expoMajor?: number;
|
|
22
40
|
/**
|
|
23
41
|
* The resolved Brownfield plugin configuration
|
|
24
42
|
*/
|
package/lib/typescript/module/src/expo-config-plugin/android/withAndroidModuleFiles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withAndroidModuleFiles.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/android/withAndroidModuleFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EAEV,yCAAyC,EAC1C,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"withAndroidModuleFiles.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/android/withAndroidModuleFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EAEV,yCAAyC,EAC1C,MAAM,UAAU,CAAC;AAIlB,OAAO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;AAkBD,wBAAgB,wCAAwC,CAAC,EACvD,UAAU,EACV,MAAM,GACP,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,yCAAyC,CAAC;CACnD,GAAG,IAAI,CAsBP;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,YAAY,CAC/C,yCAAyC,CAsC1C,CAAC"}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
* Modifies the Podfile to include the Brownfield framework target
|
|
3
3
|
* @param podfile The original Podfile content
|
|
4
4
|
* @param frameworkName The name of the framework target to add
|
|
5
|
-
* @param expoMajor The major version of the Expo SDK
|
|
5
|
+
* @param expoMajor The major version of the Expo SDK. Omit for vanilla
|
|
6
|
+
* (non-Expo) projects: the vanilla target block is inserted and no
|
|
7
|
+
* Expo-only hooks are applied.
|
|
6
8
|
* @returns The modified Podfile content
|
|
7
9
|
*/
|
|
8
|
-
export declare function modifyPodfile(podfile: string, frameworkName: string, expoMajor
|
|
10
|
+
export declare function modifyPodfile(podfile: string, frameworkName: string, expoMajor?: number): string;
|
|
9
11
|
//# sourceMappingURL=podfileHelpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"podfileHelpers.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/podfileHelpers.ts"],"names":[],"mappings":"AAoDA
|
|
1
|
+
{"version":3,"file":"podfileHelpers.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/podfileHelpers.ts"],"names":[],"mappings":"AAoDA;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAqER"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withBrownfieldIos.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/withBrownfieldIos.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAY9B,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AAItE;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAC1C,qCAAqC,
|
|
1
|
+
{"version":3,"file":"withBrownfieldIos.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/withBrownfieldIos.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAY9B,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AAItE;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAC1C,qCAAqC,CAuEtC,CAAC"}
|
|
@@ -5,13 +5,22 @@ import type { RenderedTemplateFile, ResolvedBrownfieldPluginConfigWithIos } from
|
|
|
5
5
|
* @param ios The iOS Brownfield plugin configuration
|
|
6
6
|
* @returns The list of framework source files
|
|
7
7
|
*/
|
|
8
|
-
export declare function getFrameworkSourceFiles(ios: ResolvedBrownfieldPluginConfigWithIos['ios']
|
|
8
|
+
export declare function getFrameworkSourceFiles(ios: ResolvedBrownfieldPluginConfigWithIos['ios'], options?: {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the packaged framework is expected to use the Expo host.
|
|
11
|
+
* This influences template selection for the generated framework sources.
|
|
12
|
+
* Note: expresses the same Expo-vs-vanilla axis as `templateVariant` in
|
|
13
|
+
* the Android helper (withAndroidModuleFiles.createAndroidModule), with
|
|
14
|
+
* opposite polarity: `false` here === 'vanilla' there.
|
|
15
|
+
*/
|
|
16
|
+
useExpoHost?: boolean;
|
|
17
|
+
}): RenderedTemplateFile[];
|
|
9
18
|
/**
|
|
10
19
|
* Creates the iOS framework directory structure and files
|
|
11
20
|
* @param iosDir The root iOS directory path
|
|
12
21
|
* @param config The resolved Brownfield plugin configuration
|
|
13
22
|
*/
|
|
14
|
-
export declare function createIosFramework(iosDir: string, config: ResolvedBrownfieldPluginConfigWithIos): void;
|
|
23
|
+
export declare function createIosFramework(iosDir: string, config: ResolvedBrownfieldPluginConfigWithIos, options?: Parameters<typeof getFrameworkSourceFiles>[1]): void;
|
|
15
24
|
/**
|
|
16
25
|
* Dangerous mod that creates the iOS framework directory and files
|
|
17
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withIosFrameworkFiles.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/withIosFrameworkFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EACV,oBAAoB,EACpB,qCAAqC,EACtC,MAAM,UAAU,CAAC;AAIlB;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,qCAAqC,CAAC,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"withIosFrameworkFiles.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/withIosFrameworkFiles.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EACV,oBAAoB,EACpB,qCAAqC,EACtC,MAAM,UAAU,CAAC;AAIlB;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,qCAAqC,CAAC,KAAK,CAAC,EACjD,OAAO,CAAC,EAAE;IACR;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,GACA,oBAAoB,EAAE,CAmBxB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,qCAAqC,EAC7C,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC,QA6BxD;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAC9C,qCAAqC,CAYtC,CAAC"}
|
|
@@ -6,11 +6,15 @@ import type { ResolvedBrownfieldPluginIosConfig } from '../types';
|
|
|
6
6
|
* @param project The Xcode project to modify
|
|
7
7
|
* @param options Framework target options
|
|
8
8
|
*/
|
|
9
|
-
export declare function addFrameworkTarget(project: XcodeProject, modRequest: ModProps<XcodeProject>, options: ResolvedBrownfieldPluginIosConfig
|
|
9
|
+
export declare function addFrameworkTarget(project: XcodeProject, modRequest: ModProps<XcodeProject>, options: ResolvedBrownfieldPluginIosConfig, brownfieldOptions?: {
|
|
10
|
+
useExpoHost?: boolean;
|
|
11
|
+
}): {
|
|
10
12
|
frameworkTargetUUID: string;
|
|
11
13
|
targetAlreadyExists: boolean;
|
|
12
14
|
};
|
|
13
|
-
export declare function addSourceFilesBuildPhase(project: XcodeProject, frameworkTargetUUID: string, options: ResolvedBrownfieldPluginIosConfig
|
|
15
|
+
export declare function addSourceFilesBuildPhase(project: XcodeProject, frameworkTargetUUID: string, options: ResolvedBrownfieldPluginIosConfig, brownfieldOptions?: {
|
|
16
|
+
useExpoHost?: boolean;
|
|
17
|
+
}): void;
|
|
14
18
|
export type PbxReferenceLike = {
|
|
15
19
|
value?: string;
|
|
16
20
|
comment?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xcodeHelpers.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/xcodeHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"xcodeHelpers.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/xcodeHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,YAAY,EAElB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,K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
|
|
|
18
18
|
*/
|
|
19
19
|
minSdkVersion?: number;
|
|
20
20
|
/**
|
|
21
|
-
* Target SDK version for the Android library
|
|
21
|
+
* Target SDK version for the Android library.
|
|
22
|
+
* Used on Expo SDK versions below 58; ignored on 58 and later.
|
|
22
23
|
* @default inherited from the generated Expo app project when available
|
|
23
24
|
*/
|
|
24
25
|
targetSdkVersion?: number;
|
|
25
26
|
/**
|
|
26
27
|
* Compile SDK version for the Android library
|
|
27
|
-
* @default
|
|
28
|
+
* @default 37 on Expo SDK 58 and later, otherwise 35
|
|
28
29
|
*/
|
|
29
30
|
compileSdkVersion?: number;
|
|
30
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrownfieldPluginAndroidConfig.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB
|
|
1
|
+
{"version":3,"file":"BrownfieldPluginAndroidConfig.d.ts","sourceRoot":"","sources":["../../../../../../../src/expo-config-plugin/types/android/BrownfieldPluginAndroidConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,MAAM,qCAAqC,GAAG,QAAQ,CAC1D,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,GAAG,kBAAkB,CAAC,CAC9E,GACC,IAAI,CAAC,6BAA6B,EAAE,mBAAmB,GAAG,kBAAkB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAWA,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;CACf;AAED,QAAA,MAAM,qBAAqB;IACzB;;;;;;OAMG;6BACsB,OAAO,KAAG,IAAI;IAUvC;;;;;;;OAOG;oDAC6C,OAAO,KAAG,IAAI;IAU9D;;;;;;;;;OASG;wBACiB,OAAO,KAAG,IAAI;IAKlC;;;;;;;;;;;;OAYG;0BAES,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,KACtC;QAAE,MAAM,EAAE,MAAM,IAAI,CAAA;KAAE;CAY1B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type BrownfieldScaffoldOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* React Native project root directory (contains package.json).
|
|
4
|
+
* Defaults to current working directory.
|
|
5
|
+
*/
|
|
6
|
+
projectRoot?: string;
|
|
7
|
+
/**
|
|
8
|
+
* iOS framework target name (also framework directory name).
|
|
9
|
+
* Defaults to "BrownfieldLib".
|
|
10
|
+
*/
|
|
11
|
+
iosFrameworkName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Android library module folder / Gradle module name.
|
|
14
|
+
* Defaults to "brownfieldlib".
|
|
15
|
+
*/
|
|
16
|
+
androidModuleName?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Enables verbose logging.
|
|
19
|
+
*/
|
|
20
|
+
debug?: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function scaffoldBrownfieldInRncCliProject(options?: BrownfieldScaffoldOptions): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/scaffold/index.ts"],"names":[],"mappings":"AA8CA,MAAM,MAAM,yBAAyB,GAAG;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAoGF,wBAAsB,iCAAiC,CACrD,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,IAAI,CAAC,CA+Nf"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const BROWNFIELD_RUNTIME_PACKAGE_NAME = "@callstack/react-native-brownfield";
|
|
2
|
+
export declare const BROWNFIELD_CLI_PACKAGE_NAME = "@callstack/brownfield-cli";
|
|
3
|
+
/**
|
|
4
|
+
* Match the docs convention (getting-started/quick-start + expo.mdx): both
|
|
5
|
+
* packages are regular dependencies. The brownfield CLI ships as a dependency
|
|
6
|
+
* of the runtime package, so a consistent caret range pinned to this package's
|
|
7
|
+
* own published version keeps the two in lockstep (they are released together).
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveBrownfieldPackageVersionRange(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Adds @callstack/react-native-brownfield (the Kotlin/Swift host code the
|
|
12
|
+
* scaffolded module imports) and @callstack/brownfield-cli (the `brownfield`
|
|
13
|
+
* bin used by the package:* scripts) to the app's dependencies.
|
|
14
|
+
* Existing declarations are never overwritten. Returns the names added.
|
|
15
|
+
*/
|
|
16
|
+
export declare function addBrownfieldDependencies(projectRoot: string): string[];
|
|
17
|
+
/**
|
|
18
|
+
* Adds the `package:ios` / `package:android` scripts from the docs' manual
|
|
19
|
+
* steps (settings come from the generated brownfield.config.json, so no flags
|
|
20
|
+
* are duplicated here). Existing scripts with the same names are kept.
|
|
21
|
+
*/
|
|
22
|
+
export declare function addBrownfieldPackageScripts(projectRoot: string): string[];
|
|
23
|
+
export type BrownfieldFileConfig = {
|
|
24
|
+
$schema: string;
|
|
25
|
+
ios: {
|
|
26
|
+
scheme: string;
|
|
27
|
+
configuration: string;
|
|
28
|
+
};
|
|
29
|
+
android: {
|
|
30
|
+
moduleName: string;
|
|
31
|
+
variant: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Builds the brownfield.config.json content for the scaffolded targets,
|
|
36
|
+
* matching the manual steps in docs getting-started/ios.mdx (step 5) and
|
|
37
|
+
* android.mdx (step 7) and the CLI config schema (packages/cli/src/types.ts,
|
|
38
|
+
* strict additionalProperties: false).
|
|
39
|
+
*
|
|
40
|
+
* Idempotency strategy: the content is derived deterministically from the
|
|
41
|
+
* scaffolded project state (framework/module names), so re-running the
|
|
42
|
+
* scaffold overwrites with byte-identical content. Users customizing it are
|
|
43
|
+
* taking over responsibility; a re-scaffold with the same names is a no-op.
|
|
44
|
+
*/
|
|
45
|
+
export declare function createBrownfieldFileConfig({ iosFrameworkName, androidModuleName, }: {
|
|
46
|
+
iosFrameworkName: string;
|
|
47
|
+
androidModuleName: string;
|
|
48
|
+
}): BrownfieldFileConfig;
|
|
49
|
+
/**
|
|
50
|
+
* Writes brownfield.config.json at the project root. Deterministic output:
|
|
51
|
+
* same inputs -> same bytes, so re-running the scaffold never duplicates or
|
|
52
|
+
* drifts the file.
|
|
53
|
+
*
|
|
54
|
+
* Skips writing (returns null) when another Brownfield config source already
|
|
55
|
+
* exists: packages/cli loadBrownfieldConfig fails hard on multiple config
|
|
56
|
+
* files, so an existing brownfield.config.js or a legacy `brownfield` key in
|
|
57
|
+
* package.json takes precedence over generating a JSON one.
|
|
58
|
+
*/
|
|
59
|
+
export declare function writeBrownfieldFileConfig(projectRoot: string, names: {
|
|
60
|
+
iosFrameworkName: string;
|
|
61
|
+
androidModuleName: string;
|
|
62
|
+
}): string | null;
|
|
63
|
+
//# sourceMappingURL=projectFiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectFiles.d.ts","sourceRoot":"","sources":["../../../../../src/scaffold/projectFiles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,+BAA+B,uCACN,CAAC;AACvC,eAAO,MAAM,2BAA2B,8BAA8B,CAAC;AAEvE;;;;;GAKG;AACH,wBAAgB,oCAAoC,IAAI,MAAM,CAE7D;AA4ED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAmBvE;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAsBzE;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE;QACH,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,OAAO,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,gBAAgB,EAChB,iBAAiB,GAClB,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GAAG,oBAAoB,CAcvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE;IAAE,gBAAgB,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,GAC7D,MAAM,GAAG,IAAI,CAmCf"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@callstack/react-native-brownfield",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Michal Chudziak <mike.chudziak@callstack.com>",
|
|
6
6
|
"bin": {
|
|
@@ -41,6 +41,17 @@
|
|
|
41
41
|
"default": "./lib/commonjs/expo-config-plugin/app.plugin.js"
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
+
"./scaffold": {
|
|
45
|
+
"source": "./src/scaffold/index.ts",
|
|
46
|
+
"import": {
|
|
47
|
+
"types": "./lib/typescript/module/src/scaffold/index.d.ts",
|
|
48
|
+
"default": "./lib/module/scaffold/index.js"
|
|
49
|
+
},
|
|
50
|
+
"require": {
|
|
51
|
+
"types": "./lib/typescript/commonjs/src/scaffold/index.d.ts",
|
|
52
|
+
"default": "./lib/commonjs/scaffold/index.js"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
44
55
|
"./package.json": "./package.json"
|
|
45
56
|
},
|
|
46
57
|
"scripts": {
|
|
@@ -89,7 +100,10 @@
|
|
|
89
100
|
"@expo/config-plugins": ">=54 <100"
|
|
90
101
|
},
|
|
91
102
|
"dependencies": {
|
|
92
|
-
"@callstack/brownfield-cli": "^5.
|
|
103
|
+
"@callstack/brownfield-cli": "^5.3.0",
|
|
104
|
+
"@react-native-community/cli-config": "^20.0.0",
|
|
105
|
+
"@react-native-community/cli-types": "^20.0.0",
|
|
106
|
+
"xcode": "^3.0.1"
|
|
93
107
|
},
|
|
94
108
|
"devDependencies": {
|
|
95
109
|
"@babel/core": "^7.29.6",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const BROWNFIELD_PLUGIN_VERSION = '2.0.0-
|
|
1
|
+
export const BROWNFIELD_PLUGIN_VERSION = '2.0.0-alpha10';
|
|
2
2
|
export const brownfieldGradlePluginDependency = `classpath("com.callstack.react:brownfield-gradle-plugin:${BROWNFIELD_PLUGIN_VERSION}")`;
|