@callstack/brownfield-cli 2.0.0-rc.2 → 3.0.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 +31 -0
- package/README.md +1 -1
- package/package.json +2 -2
- package/dist/brownfield/utils/index.d.ts +0 -4
- package/dist/brownfield/utils/index.d.ts.map +0 -1
- package/dist/brownfield/utils/index.js +0 -3
- package/dist/brownfield/utils/rn-cli.d.ts +0 -17
- package/dist/brownfield/utils/rn-cli.d.ts.map +0 -1
- package/dist/brownfield/utils/rn-cli.js +0 -31
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @callstack/brownfield-cli
|
|
2
|
+
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#255](https://github.com/callstack/react-native-brownfield/pull/255) [`48358b2`](https://github.com/callstack/react-native-brownfield/commit/48358b2dcce578aa5052e66cc3454524da8c7992) Thanks [@artus9033](https://github.com/artus9033)! - chore: release stable v3
|
|
8
|
+
|
|
9
|
+
## 1.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#216](https://github.com/callstack/react-native-brownfield/pull/216) [`8ce3ea1`](https://github.com/callstack/react-native-brownfield/commit/8ce3ea10e0719adac7396dea8f171753e901b31d) Thanks [@thymikee](https://github.com/thymikee)! - chore: remove release-it
|
|
14
|
+
|
|
15
|
+
## 1.0.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#213](https://github.com/callstack/react-native-brownfield/pull/213) [`2347775`](https://github.com/callstack/react-native-brownfield/commit/23477753b16ee189b82c1aee3eac98a56c79f52a) Thanks [@thymikee](https://github.com/thymikee)! - feat: create brownfield package as CLI proxy
|
|
20
|
+
|
|
21
|
+
## 1.0.2
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [`2a8563f`](https://github.com/callstack/react-native-brownfield/commit/2a8563f65ed152054ad1290caf963791a368ee9a) Thanks [@okwasniewski](https://github.com/okwasniewski)! - feat: strip framework binaries to avoid duplicate symbol errors
|
|
26
|
+
|
|
27
|
+
## 1.0.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [#198](https://github.com/callstack/react-native-brownfield/pull/198) [`c8c903d`](https://github.com/callstack/react-native-brownfield/commit/c8c903d0d2b78a8c06a41213dfbe781a2daf3d25) Thanks [@artus9033](https://github.com/artus9033)! - docs: added README files to all packages
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
## Documentation
|
|
31
31
|
|
|
32
|
-
For full documentation, visit [our documentation](https://oss.callstack.com/react-native-brownfield/
|
|
32
|
+
For full documentation, visit [our documentation](https://oss.callstack.com/react-native-brownfield/docs/cli/introduction).
|
|
33
33
|
|
|
34
34
|
<a href="https://www.callstack.com/ebooks/incremental-react-native-adoption-in-native-apps?utm_campaign=brownfield&utm_source=github&utm_medium=referral&utm_content=react-native-brownfield" align="center">
|
|
35
35
|
<img alt="Download a free copy of Incremental React Native adoption in native apps ebook" src="https://github.com/user-attachments/assets/ba42bb29-1e7a-4683-80c5-2602afb1a7e6">
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/brownfield/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { PackageAarFlags } from '@rock-js/platform-android';
|
|
2
|
-
import type { AndroidProjectConfig, Config as UserConfig, ProjectConfig } from '@react-native-community/cli-types';
|
|
3
|
-
/**
|
|
4
|
-
* Gets the project info for the given platform from the current working directory
|
|
5
|
-
* @param platform the platform for which to get project info
|
|
6
|
-
* @returns project root and android project config
|
|
7
|
-
*/
|
|
8
|
-
export declare function getProjectInfo<Platform extends 'ios' | 'android'>(platform: Platform): {
|
|
9
|
-
projectRoot: string;
|
|
10
|
-
userConfig: UserConfig;
|
|
11
|
-
platformConfig: ProjectConfig[Platform];
|
|
12
|
-
};
|
|
13
|
-
export declare const getAarConfig: (args: PackageAarFlags, androidConfig: AndroidProjectConfig) => {
|
|
14
|
-
sourceDir: string;
|
|
15
|
-
moduleName: string;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=rn-cli.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rn-cli.d.ts","sourceRoot":"","sources":["../../../src/brownfield/utils/rn-cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EACV,oBAAoB,EACpB,MAAM,IAAI,UAAU,EACpB,aAAa,EACd,MAAM,mCAAmC,CAAC;AAW3C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,SAAS,KAAK,GAAG,SAAS,EAC/D,QAAQ,EAAE,QAAQ,GACjB;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,UAAU,CAAC;IACvB,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;CACzC,CAmBA;AAED,eAAO,MAAM,YAAY,GACvB,MAAM,eAAe,EACrB,eAAe,oBAAoB;;;CAOpC,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import cliConfigImport from '@react-native-community/cli-config';
|
|
2
|
-
const cliConfig = typeof cliConfigImport === 'function'
|
|
3
|
-
? cliConfigImport
|
|
4
|
-
: // @ts-expect-error: interop default
|
|
5
|
-
cliConfigImport.default;
|
|
6
|
-
import { findProjectRoot, makeRelativeProjectConfigPaths } from './paths.js';
|
|
7
|
-
/**
|
|
8
|
-
* Gets the project info for the given platform from the current working directory
|
|
9
|
-
* @param platform the platform for which to get project info
|
|
10
|
-
* @returns project root and android project config
|
|
11
|
-
*/
|
|
12
|
-
export function getProjectInfo(platform) {
|
|
13
|
-
const projectRoot = findProjectRoot();
|
|
14
|
-
const userConfig = cliConfig({
|
|
15
|
-
projectRoot,
|
|
16
|
-
selectedPlatform: platform,
|
|
17
|
-
});
|
|
18
|
-
// below: relative sourceDir path is required by RN CLI's API
|
|
19
|
-
const platformConfig = makeRelativeProjectConfigPaths(projectRoot, userConfig.project[platform]);
|
|
20
|
-
if (!platformConfig) {
|
|
21
|
-
throw new Error(`${platform} project not found.`);
|
|
22
|
-
}
|
|
23
|
-
return { projectRoot, userConfig, platformConfig };
|
|
24
|
-
}
|
|
25
|
-
export const getAarConfig = (args, androidConfig) => {
|
|
26
|
-
const config = {
|
|
27
|
-
sourceDir: androidConfig.sourceDir,
|
|
28
|
-
moduleName: args.moduleName ?? '',
|
|
29
|
-
};
|
|
30
|
-
return config;
|
|
31
|
-
};
|