@rock-js/plugin-brownfield-ios 0.12.12 → 0.13.1
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/src/lib/copyReactXcframeworks.d.ts +5 -0
- package/dist/src/lib/copyReactXcframeworks.d.ts.map +1 -0
- package/dist/src/lib/copyReactXcframeworks.js +37 -0
- package/dist/src/lib/copyReactXcframeworks.js.map +1 -0
- package/dist/src/lib/pluginBrownfieldIos.d.ts.map +1 -1
- package/dist/src/lib/pluginBrownfieldIos.js +8 -1
- package/dist/src/lib/pluginBrownfieldIos.js.map +1 -1
- package/package.json +6 -6
- package/src/lib/copyReactXcframeworks.ts +63 -0
- package/src/lib/pluginBrownfieldIos.ts +9 -1
- package/template/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyReactXcframeworks.d.ts","sourceRoot":"","sources":["../../../src/lib/copyReactXcframeworks.ts"],"names":[],"mappings":"AAIA,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,cAAc,GACf,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;CACxB,QAoDA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import fs, { existsSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { color, logger, spinner } from '@rock-js/tools';
|
|
4
|
+
export function copyReactXcframeworks({ sourceDir, destinationDir, }) {
|
|
5
|
+
const react = 'React.xcframework';
|
|
6
|
+
const reactNativeDependencies = 'ReactNativeDependencies.xcframework';
|
|
7
|
+
const loader = spinner();
|
|
8
|
+
const reactFrameworkSource = path.join(sourceDir, `Pods/React-Core-prebuilt/${react}`);
|
|
9
|
+
const reactNativeDepsSource = path.join(sourceDir, `Pods/ReactNativeDependencies/framework/packages/react-native/${reactNativeDependencies}`);
|
|
10
|
+
if (existsSync(reactFrameworkSource)) {
|
|
11
|
+
loader.start(`Copying ${color.bold(react)}`);
|
|
12
|
+
const reactDestination = path.join(destinationDir, react);
|
|
13
|
+
if (existsSync(reactDestination)) {
|
|
14
|
+
logger.debug(`Removing old ${react} copy`);
|
|
15
|
+
fs.rmSync(reactDestination, { recursive: true, force: true });
|
|
16
|
+
}
|
|
17
|
+
fs.cpSync(reactFrameworkSource, reactDestination, {
|
|
18
|
+
recursive: true,
|
|
19
|
+
force: true,
|
|
20
|
+
});
|
|
21
|
+
loader.stop(`Copied ${color.bold(react)}`);
|
|
22
|
+
}
|
|
23
|
+
if (existsSync(reactNativeDepsSource)) {
|
|
24
|
+
loader.start(`Copying ${color.bold(reactNativeDependencies)}`);
|
|
25
|
+
const reactNativeDepsDestination = path.join(destinationDir, reactNativeDependencies);
|
|
26
|
+
if (existsSync(reactNativeDepsDestination)) {
|
|
27
|
+
logger.debug(`Removing old ${reactNativeDependencies} copy`);
|
|
28
|
+
fs.rmSync(reactNativeDepsDestination, { recursive: true, force: true });
|
|
29
|
+
}
|
|
30
|
+
fs.cpSync(reactNativeDepsSource, reactNativeDepsDestination, {
|
|
31
|
+
recursive: true,
|
|
32
|
+
force: true,
|
|
33
|
+
});
|
|
34
|
+
loader.stop(`Copied ${color.bold(reactNativeDependencies)}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=copyReactXcframeworks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyReactXcframeworks.js","sourceRoot":"","sources":["../../../src/lib/copyReactXcframeworks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,UAAU,qBAAqB,CAAC,EACpC,SAAS,EACT,cAAc,GAIf;IACC,MAAM,KAAK,GAAG,mBAAmB,CAAC;IAClC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C;YAC3C,MAAM,CAAC,KAAK,CAAC,gBAAgB,uBAAuB,OAAO,CAAC,CAAC;YAC7D,EAAE,CAAC,MAAM,CAAC,0BAA0B,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,CAAC;QAED,EAAE,CAAC,MAAM,CAAC,qBAAqB,EAAE,0BAA0B,EAAE;YAC3D,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,EAAE,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginBrownfieldIos.d.ts","sourceRoot":"","sources":["../../../src/lib/pluginBrownfieldIos.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAEL,KAAK,UAAU,EAMhB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"pluginBrownfieldIos.d.ts","sourceRoot":"","sources":["../../../src/lib/pluginBrownfieldIos.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAEL,KAAK,UAAU,EAMhB,MAAM,iCAAiC,CAAC;AAOzC,eAAO,MAAM,gBAAgB,GAC3B,MAAM,UAAU,EAChB,iGAOG;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAAC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,EACD,eAAe,gBAAgB,kBAmGhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC7B,eAAe,gBAAgB,MAC/B,KAAK,SAAS,KAAG,YAsBjB,CAAC;AAEJ,eAAe,mBAAmB,CAAC"}
|
|
@@ -2,9 +2,11 @@ import path from 'node:path';
|
|
|
2
2
|
import { buildApp, genericDestinations, getBuildOptions, getBuildPaths, getValidProjectConfig, mergeFrameworks, } from '@rock-js/platform-apple-helpers';
|
|
3
3
|
import { colorLink, intro, logger, outro, relativeToCwd } from '@rock-js/tools';
|
|
4
4
|
import { copyHermesXcframework } from './copyHermesXcframework.js';
|
|
5
|
+
import { copyReactXcframeworks } from './copyReactXcframeworks.js';
|
|
5
6
|
const buildOptions = getBuildOptions({ platformName: 'ios' });
|
|
6
7
|
export const packageIosAction = async (args, { projectRoot, reactNativePath, reactNativeVersion, usePrebuiltRNCore, skipCache, packageDir, }, pluginConfig) => {
|
|
7
8
|
intro('Packaging iOS project');
|
|
9
|
+
logger.setVerbose(args.verbose ?? false);
|
|
8
10
|
// 1) Build the project
|
|
9
11
|
const iosConfig = getValidProjectConfig('ios', projectRoot, pluginConfig);
|
|
10
12
|
const destination = args.destination ?? [
|
|
@@ -56,7 +58,12 @@ export const packageIosAction = async (args, { projectRoot, reactNativePath, rea
|
|
|
56
58
|
destinationDir: frameworkTargetOutputDir,
|
|
57
59
|
reactNativeVersion,
|
|
58
60
|
});
|
|
59
|
-
// 5)
|
|
61
|
+
// 5) Copy React and ReactNativeDependencies xcframeworks to the output path
|
|
62
|
+
copyReactXcframeworks({
|
|
63
|
+
sourceDir,
|
|
64
|
+
destinationDir: frameworkTargetOutputDir,
|
|
65
|
+
});
|
|
66
|
+
// 6) Inform the user
|
|
60
67
|
logger.log(`XCFrameworks are available at: ${colorLink(relativeToCwd(frameworkTargetOutputDir))}`);
|
|
61
68
|
outro('Success 🎉.');
|
|
62
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pluginBrownfieldIos.js","sourceRoot":"","sources":["../../../src/lib/pluginBrownfieldIos.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EACL,QAAQ,EAER,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,eAAe,GAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,YAAY,GAAG,eAAe,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;AAE9D,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EACnC,IAAgB,EAChB,EACE,WAAW,EACX,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,UAAU,GAQX,EACD,YAA+B,EAC/B,EAAE;IACF,KAAK,CAAC,uBAAuB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"pluginBrownfieldIos.js","sourceRoot":"","sources":["../../../src/lib/pluginBrownfieldIos.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EACL,QAAQ,EAER,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,eAAe,GAChB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,YAAY,GAAG,eAAe,CAAC,EAAE,YA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,CAAC;IAEF,KAAK,CAAC,aAAa,CAAC,CAAC;AACvB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAC9B,CAAC,YAA+B,EAAE,EAAE,CACpC,CAAC,GAAc,EAAgB,EAAE;IAC/B,GAAG,CAAC,eAAe,CAAC;QAClB,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,kDAAkD;QAC/D,MAAM,EAAE,KAAK,EAAE,IAAgB,EAAE,EAAE,CACjC,gBAAgB,CACd,IAAI,EACJ;YACE,WAAW,EAAE,GAAG,CAAC,cAAc,EAAE;YACjC,eAAe,EAAE,GAAG,CAAC,kBAAkB,EAAE;YACzC,kBAAkB,EAAE,GAAG,CAAC,qBAAqB,EAAE;YAC/C,iBAAiB,EAAE,GAAG,CAAC,oBAAoB,EAAE;SAC9C,EACD,YAAY,CACb;QACH,OAAO,EAAE,YAAY;KACtB,CAAC,CAAC;IAEH,OAAO;QACL,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,iCAAiC;KAC/C,CAAC;AACJ,CAAC,CAAC;AAEJ,eAAe,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rock-js/plugin-brownfield-ios",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Plugin for integrating Rock projects with existing iOS apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -22,23 +22,23 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@react-native-community/cli-config-apple": "^20.0.0",
|
|
24
24
|
"@react-native-community/cli-types": "^20.0.0",
|
|
25
|
-
"@rock-js/tools": "^0.
|
|
26
|
-
"@rock-js/platform-apple-helpers": "^0.
|
|
25
|
+
"@rock-js/tools": "^0.13.1",
|
|
26
|
+
"@rock-js/platform-apple-helpers": "^0.13.1",
|
|
27
27
|
"tslib": "^2.3.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@rock-js/config": "^0.
|
|
30
|
+
"@rock-js/config": "^0.13.1"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|
|
37
|
-
"url": "git+https://github.com/
|
|
37
|
+
"url": "git+https://github.com/callstackincubator/rock.git",
|
|
38
38
|
"directory": "packages/plugin-brownfield-ios"
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://rockjs.dev",
|
|
41
|
-
"bugs": "https://github.com/
|
|
41
|
+
"bugs": "https://github.com/callstackincubator/rock/issues",
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"author": "Callstack <incubator@callstack.com>"
|
|
44
44
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import fs, { existsSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { color, logger, spinner } from '@rock-js/tools';
|
|
4
|
+
|
|
5
|
+
export function copyReactXcframeworks({
|
|
6
|
+
sourceDir,
|
|
7
|
+
destinationDir,
|
|
8
|
+
}: {
|
|
9
|
+
sourceDir: string;
|
|
10
|
+
destinationDir: string;
|
|
11
|
+
}) {
|
|
12
|
+
const react = 'React.xcframework';
|
|
13
|
+
const reactNativeDependencies = 'ReactNativeDependencies.xcframework';
|
|
14
|
+
const loader = spinner();
|
|
15
|
+
|
|
16
|
+
const reactFrameworkSource = path.join(
|
|
17
|
+
sourceDir,
|
|
18
|
+
`Pods/React-Core-prebuilt/${react}`,
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
const reactNativeDepsSource = path.join(
|
|
22
|
+
sourceDir,
|
|
23
|
+
`Pods/ReactNativeDependencies/framework/packages/react-native/${reactNativeDependencies}`,
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
if (existsSync(reactFrameworkSource)) {
|
|
27
|
+
loader.start(`Copying ${color.bold(react)}`);
|
|
28
|
+
const reactDestination = path.join(destinationDir, react);
|
|
29
|
+
|
|
30
|
+
if (existsSync(reactDestination)) {
|
|
31
|
+
logger.debug(`Removing old ${react} copy`);
|
|
32
|
+
fs.rmSync(reactDestination, { recursive: true, force: true });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
fs.cpSync(reactFrameworkSource, reactDestination, {
|
|
36
|
+
recursive: true,
|
|
37
|
+
force: true,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
loader.stop(`Copied ${color.bold(react)}`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (existsSync(reactNativeDepsSource)) {
|
|
44
|
+
loader.start(`Copying ${color.bold(reactNativeDependencies)}`);
|
|
45
|
+
|
|
46
|
+
const reactNativeDepsDestination = path.join(
|
|
47
|
+
destinationDir,
|
|
48
|
+
reactNativeDependencies,
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
if (existsSync(reactNativeDepsDestination)) {
|
|
52
|
+
logger.debug(`Removing old ${reactNativeDependencies} copy`);
|
|
53
|
+
fs.rmSync(reactNativeDepsDestination, { recursive: true, force: true });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
fs.cpSync(reactNativeDepsSource, reactNativeDepsDestination, {
|
|
57
|
+
recursive: true,
|
|
58
|
+
force: true,
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
loader.stop(`Copied ${color.bold(reactNativeDependencies)}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
} from '@rock-js/platform-apple-helpers';
|
|
13
13
|
import { colorLink, intro, logger, outro, relativeToCwd } from '@rock-js/tools';
|
|
14
14
|
import { copyHermesXcframework } from './copyHermesXcframework.js';
|
|
15
|
+
import { copyReactXcframeworks } from './copyReactXcframeworks.js';
|
|
15
16
|
|
|
16
17
|
const buildOptions = getBuildOptions({ platformName: 'ios' });
|
|
17
18
|
|
|
@@ -35,6 +36,7 @@ export const packageIosAction = async (
|
|
|
35
36
|
pluginConfig?: IOSProjectConfig,
|
|
36
37
|
) => {
|
|
37
38
|
intro('Packaging iOS project');
|
|
39
|
+
logger.setVerbose(args.verbose ?? false);
|
|
38
40
|
|
|
39
41
|
// 1) Build the project
|
|
40
42
|
const iosConfig = getValidProjectConfig('ios', projectRoot, pluginConfig);
|
|
@@ -116,7 +118,13 @@ export const packageIosAction = async (
|
|
|
116
118
|
reactNativeVersion,
|
|
117
119
|
});
|
|
118
120
|
|
|
119
|
-
// 5)
|
|
121
|
+
// 5) Copy React and ReactNativeDependencies xcframeworks to the output path
|
|
122
|
+
copyReactXcframeworks({
|
|
123
|
+
sourceDir,
|
|
124
|
+
destinationDir: frameworkTargetOutputDir,
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// 6) Inform the user
|
|
120
128
|
logger.log(
|
|
121
129
|
`XCFrameworks are available at: ${colorLink(
|
|
122
130
|
relativeToCwd(frameworkTargetOutputDir),
|