Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release/1.0 to main update #1260

Merged
merged 66 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
a7d3ab4
1.0.0-rc.0
pavjacko Nov 24, 2023
4e204b3
fixed configureTizenGlobal <= check for tizen certificate in Tizen St…
ElenaDiachenko Nov 25, 2023
9cb0468
remove appid and title from appConfig, set the answers properly
mihaiblaga89 Nov 27, 2023
e6b3eca
fix tests
mihaiblaga89 Nov 27, 2023
834dc3d
Merge pull request #1258 from flexn-io/fix/tizen_certificate
mihaiblaga89 Nov 27, 2023
6e052f2
added expl comments for workarounds
pavjacko Nov 27, 2023
93e8a4e
extract android device decision from running
mihaiblaga89 Nov 27, 2023
fc947c4
rework device logic
mihaiblaga89 Nov 27, 2023
501e739
Merge pull request #1259 from flexn-io/fix/appid_title_fix
pavjacko Nov 27, 2023
bd3648d
silence avd start
mihaiblaga89 Nov 27, 2023
e805007
remove testing code
mihaiblaga89 Nov 27, 2023
a711aed
remove duplicate emulators
mihaiblaga89 Nov 27, 2023
f616e2a
due to change of nextjs bundler name to next-babel-turbo-loader , exp…
pavjacko Nov 28, 2023
733669f
clean up engine dependencies, remove rn cli as explicit dep from proj…
pavjacko Nov 28, 2023
53fc637
add cert and pp to crypto, fix tvos export
mihaiblaga89 Nov 28, 2023
4f5ba30
added ios pp, removed cl
mihaiblaga89 Nov 28, 2023
838de0e
update xml2js
pavjacko Nov 28, 2023
99fb457
added appleSetup hook, readme for export
mihaiblaga89 Nov 28, 2023
6aa3502
updated readme
mihaiblaga89 Nov 28, 2023
eed74a6
fix empty target, don't pick first device regardless of what's happening
mihaiblaga89 Nov 28, 2023
d4db76c
dep updates
pavjacko Nov 28, 2023
75d1af1
fix StatusBar style _ android
ElenaDiachenko Nov 29, 2023
6d277ec
fix_assets for tvos
ElenaDiachenko Nov 29, 2023
2ec60f7
don't fall back to create emu if there's one active device
mihaiblaga89 Nov 29, 2023
7aa79d8
Merge pull request #1266 from flexn-io/fix/assets_tvos
mihaiblaga89 Nov 29, 2023
d3866d3
add test for sdk-tizen/runner
ElenaDiachenko Nov 29, 2023
3f808d9
move device logic from xcrun to appium
mihaiblaga89 Nov 29, 2023
4605736
Merge pull request #1263 from flexn-io/fix/dep-cleanup-fixes
pavjacko Nov 30, 2023
35f8b3b
Merge pull request #1265 from flexn-io/fix/statusBar_style
pavjacko Nov 30, 2023
4723ebb
Merge pull request #1264 from flexn-io/fix/apple_certs
pavjacko Nov 30, 2023
a49acf1
1.0.0-rc.1
pavjacko Nov 30, 2023
b4137da
add icon to the tizen build
ElenaDiachenko Nov 30, 2023
fc397d2
inquirer yes param, tizen files copy optimization
mihaiblaga89 Nov 30, 2023
51f3f1c
Merge pull request #1267 from flexn-io/add_tests
mihaiblaga89 Nov 30, 2023
7e928a4
Merge branch 'release/1.0' into fix/android_dev_management
mihaiblaga89 Nov 30, 2023
eb9656a
removed cl, fix tests
mihaiblaga89 Nov 30, 2023
a150746
cleanup
mihaiblaga89 Nov 30, 2023
2fee7d6
Merge branch 'release/1.0' into fix/ios_dev_management
mihaiblaga89 Nov 30, 2023
6faf5ae
change ci mode logic + add validation
ElenaDiachenko Dec 1, 2023
1234b50
fix order of func execution
ElenaDiachenko Dec 1, 2023
dee469d
sims behaving as documented, wip
mihaiblaga89 Dec 4, 2023
4efea1a
added appium-ios-device typings
mihaiblaga89 Dec 5, 2023
68c10d9
Merge branch 'fix/ios_dev_management' of github.com:pavjacko/renative…
mihaiblaga89 Dec 5, 2023
7e96b98
fix ts, added back appium-ios-device
mihaiblaga89 Dec 5, 2023
480824e
clean code
ElenaDiachenko Dec 6, 2023
38f4edd
removed cl
mihaiblaga89 Dec 6, 2023
c4dc40f
-d device, no -d sim, don't care about active device/sim
mihaiblaga89 Dec 6, 2023
ecc660a
show devices and sims regardless with -t
mihaiblaga89 Dec 6, 2023
11b8e01
don't pick device when looking for emu, specify which emu to wait for
mihaiblaga89 Dec 6, 2023
ac42ac0
linting
mihaiblaga89 Dec 6, 2023
9fd9d0b
Merge pull request #1262 from flexn-io/fix/android_dev_management
mihaiblaga89 Dec 6, 2023
5cd93a3
restore tizen files copy optimization
ElenaDiachenko Dec 7, 2023
8678b20
Merge branch 'release/1.0' of github.com:pavjacko/renative into fix/i…
mihaiblaga89 Dec 7, 2023
071eebb
don't filter devices on -t, remove -d device support
mihaiblaga89 Dec 7, 2023
e511a4a
revert to previous version
mihaiblaga89 Dec 7, 2023
290e7ed
fixed sanitizing projectName when generating inputAppID.defaultValue
ElenaDiachenko Dec 7, 2023
dcd977d
fix ipad detection
mihaiblaga89 Dec 7, 2023
73e34b6
Merge pull request #1269 from flexn-io/fix/ios_dev_management
pavjacko Dec 7, 2023
02c6c6f
Merge pull request #1274 from flexn-io/fix/ci-mode
mihaiblaga89 Dec 7, 2023
1bc7abf
1.0.0-rc.2
mihaiblaga89 Dec 7, 2023
8c42fcd
fix eject packaging
pavjacko Dec 8, 2023
8c8aadd
Merge pull request #1280 from flexn-io/fix/eject
mihaiblaga89 Dec 8, 2023
e59faa7
added versionCode and versionName to app/build.gradle as injections
ElenaDiachenko Dec 8, 2023
0e578df
clean code
ElenaDiachenko Dec 8, 2023
9119380
1.0.0-rc.3
pavjacko Dec 8, 2023
491660e
Merge pull request #1281 from flexn-io/fix/injects
mihaiblaga89 Dec 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions __mocks__/appium-ios-device.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// __mocks__/appium-ios-device.ts
const aid: any = {
utilities: {
getConnectedDevices: jest.fn(() => Promise.resolve(['1234'])),
getDeviceInfo: jest.fn(() => Promise.resolve({ name: 'iPhone 14 Pro Max', isAvailable: true })),
},
};

module.exports = aid;
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@flexn/renative-monorepo",
"version": "1.0.0-canary.9",
"version": "1.0.0-rc.3",
"description": "🚀🚀🚀 Unified Development Platform. Bootstrap, Develop & Deploy `iOS`, `tvOS`, `Android`, `Android TV`, `Fire TV`, `Android Wear`, `Web`, `Tizen TV`, `Tizen Watch`, `Tizen Mobile`, `LG webOS`, `macOS/OSX`, `Windows`, `KaiOS`, `Linux` and `Chromecast` platforms",
"keywords": [
"android tv",
Expand Down Expand Up @@ -60,10 +60,10 @@
"bootstrap-clean": "rimraf -I ./node_modules; npx lerna clean --yes && yarn bootstrap",
"build": "lerna run build",
"compile": "npx lerna run compile",
"deploy:canary": "yarn pre-publish && npx lerna publish from-package --dist-tag canary && git push origin HEAD",
"deploy:feat": "yarn pre-publish && npx lerna publish from-package --dist-tag feat && git push origin HEAD",
"deploy:next": "yarn pre-publish && npx lerna publish from-package --dist-tag next && git push origin HEAD",
"deploy:prod": "yarn pre-publish && npx lerna publish from-package && git push origin HEAD",
"deploy:canary": "yarn pre-publish && npx lerna publish from-package --dist-tag canary && git push --tags origin HEAD",
"deploy:feat": "yarn pre-publish && npx lerna publish from-package --dist-tag feat && git push --tags origin HEAD",
"deploy:next": "yarn pre-publish && npx lerna publish from-package --dist-tag next && git push --tags origin HEAD",
"deploy:prod": "yarn pre-publish && npx lerna publish from-package && git push --tags origin HEAD",
"e2e-template-starter-android": "cd packages/template-starter && npx rnv build -p android -s test -c template --packageManager yarn && yarn e2e:android",
"e2e-template-starter-androidtv": "cd packages/template-starter && npx rnv build -p androidtv -s test -c template --packageManager yarn && yarn e2e:androidtv",
"e2e-template-starter-ios": "cd packages/template-starter && npx rnv build -p ios -s test -c template --packageManager yarn && yarn e2e:ios",
Expand All @@ -89,8 +89,8 @@
"@flexn/eslint-config": "1.0.0",
"@flexn/prettier-config": "1.0.0",
"@flexn/typescript-config": "1.0.0",
"@rnv/build-hooks-git": "1.0.0-canary.9",
"@rnv/core": "1.0.0-canary.9",
"@rnv/build-hooks-git": "1.0.0-rc.3",
"@rnv/core": "1.0.0-rc.3",
"@types/jest": "~27.0.2",
"@types/kill-port": "2.0.0",
"@types/lodash.get": "4.4.7",
Expand Down
8 changes: 8 additions & 0 deletions packages/app-harness/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
# @rnv/app-harness

### Exporting App Harness

#### iOS, tvOS
1. `npx rnv crypto decrypt`
2. `npx rnv hooks run -x appleSetup`. Make sure you have fastlane installed before running this command.
3. `npx rnv export -p [platform] -s release`

2 changes: 2 additions & 0 deletions packages/app-harness/buildHooks/src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { logHook } from '@rnv/core';
import appleSetup from './setup/apple';

const hooks = {
hello: async () => {
logHook('Hello build hook!');
},
appleSetup,
};

const pipes = {};
Expand Down
28 changes: 28 additions & 0 deletions packages/app-harness/buildHooks/src/setup/apple.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import path from 'path'
import { executeAsync, logInfo, logError } from '@rnv/core';

export default async (c) => {
const certRelativePath = c.files.workspace.project?.configPrivate?.apple?.p12?.path;

if (!certRelativePath) {
return logError('No configPrivate found. You sure you decrypted?', true);
}
const certPass = c.files.workspace.project?.configPrivate?.apple?.p12?.password;
const certPath = path.resolve(c.paths.workspace.project.dir, certRelativePath);

logInfo(`Importing certificate ${certPath}`);
await executeAsync(`fastlane run import_certificate certificate_path:${certPath} certificate_password:${certPass} keychain_name:login`, { privateParams: [certPass] });

const profiles = c.files.workspace.project?.configPrivate?.apple?.provisioningProfiles;

if (!profiles) {
return;
}

await Promise.all(profiles.map(async (profile) => {
const profileRelativePath = profile?.path;
const profilePath = path.resolve(c.paths.workspace.project.dir, profileRelativePath);
logInfo(`Installing provisioning profile ${profilePath}`);
await executeAsync(`fastlane run install_provisioning_profile path:${profilePath}`);
}))
}
27 changes: 11 additions & 16 deletions packages/app-harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
},
"dependencies": {
"@lightningjs/sdk": "^5.4.1",
"@react-native-community/cli": "^11.3.8",
"@rnv/renative": "1.0.0-canary.9",
"@rnv/renative": "1.0.0-rc.3",
"next": "13.5.2",
"raf": "3.4.1",
"react": "18.2.0",
Expand All @@ -45,26 +44,22 @@
},
"devDependencies": {
"@flexn/assets-renative-outline": "0.3.2",
"@flexn/graybox": "0.21.1",
"@flexn/typescript-config": "1.0.0",
"@rnv/core": "1.0.0-canary.9",
"@rnv/engine-lightning": "1.0.0-canary.9",
"@rnv/engine-rn": "1.0.0-canary.9",
"@rnv/engine-rn-electron": "1.0.0-canary.9",
"@rnv/engine-rn-next": "1.0.0-canary.9",
"@rnv/engine-rn-tvos": "1.0.0-canary.9",
"@rnv/engine-rn-web": "1.0.0-canary.9",
"@rnv/template-starter": "1.0.0-canary.9",
"@rnv/core": "1.0.0-rc.3",
"@rnv/engine-lightning": "1.0.0-rc.3",
"@rnv/engine-rn": "1.0.0-rc.3",
"@rnv/engine-rn-electron": "1.0.0-rc.3",
"@rnv/engine-rn-next": "1.0.0-rc.3",
"@rnv/engine-rn-tvos": "1.0.0-rc.3",
"@rnv/engine-rn-web": "1.0.0-rc.3",
"@rnv/template-starter": "1.0.0-rc.3",
"@types/react": "18.2.22",
"@types/react-dom": "18.2.7",
"@types/react-native": "0.72.2",
"babel-jest": "29.2.1",
"babel-loader": "9.1.3",
"detox": "18.20.2",
"jetifier": "1.6.5",
"metro-react-native-babel-preset": "0.76.8",
"rnv": "1.0.0-canary.9",
"xcode": "2.1.0"
"jetifier": "2.0.0",
"rnv": "1.0.0-rc.3"
},
"private": true
}
3 changes: 0 additions & 3 deletions packages/app-harness/renative.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
"projectName": "@rnv/app-harness",
"crypto": {
"path": "./secrets/privateConfigs.enc"
},
"plugins": {
"@react-native-community/cli": "^11.3.8"
}
}
Binary file modified packages/app-harness/secrets/privateConfigs.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/app-harness/secrets/privateConfigs.enc.timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1700788548375
1701203486144
4 changes: 2 additions & 2 deletions packages/build-hooks-git/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rnv/build-hooks-git",
"version": "1.0.0-canary.9",
"version": "1.0.0-rc.3",
"description": "Build Hooks for Git",
"keywords": [],
"homepage": "https://github.com/flexn-io/renative#readme",
Expand Down Expand Up @@ -30,7 +30,7 @@
"simple-git": "^3.16.0"
},
"peerDependencies": {
"@rnv/core": "^1.0.0-canary.9"
"@rnv/core": "^1.0.0-rc.3"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/build-hooks-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"zod-to-json-schema": "3.21.4"
},
"peerDependencies": {
"@rnv/core": "^1.0.0-canary.9"
"@rnv/core": "^1.0.0-rc.3"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rnv/cli",
"version": "1.0.0-canary.9",
"version": "1.0.0-rc.3",
"description": "ReNative CLI",
"keywords": [],
"homepage": "https://github.com/flexn-io/renative#readme",
Expand Down Expand Up @@ -37,7 +37,7 @@
"inquirer": "8.2.0"
},
"peerDependencies": {
"@rnv/core": "^1.0.0-canary.9"
"@rnv/core": "^1.0.0-rc.3"
},
"private": false,
"publishConfig": {
Expand Down
7 changes: 0 additions & 7 deletions packages/cli/src/logger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,6 @@ export const logSummary = (header = 'SUMMARY') => {
str += printArrIntoBox(plats, 'Supported Platforms: ');
}

if (ctx.files?.project?.config?.defaults) {
const currentTemplate = ctx.files.project.config?.currentTemplate;
if (currentTemplate) {
str += printIntoBox(`Master Template: ${_highlightColor(currentTemplate)}`);
}
}

if (ctx.process) {
const envString = `${ctx.process.platform} | ${ctx.process.arch} | node v${ctx.process.versions?.node}`;
str += printIntoBox(`Env Info: ${currentChalk.gray(envString)}`);
Expand Down
29 changes: 19 additions & 10 deletions packages/cli/src/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,32 @@ import {

export const inquirerPrompt = async (params: PromptParams): Promise<Record<string, any>> => {
const c = getContext();
if (c.program?.yes) return {};

if (c.program?.yes && params.type === 'confirm' && params.name) {
return { [params.name]: true };
} else if (c.program?.yes && params.type === 'input' && params.name && params.default) {
return { [params.name]: typeof params.default === 'function' ? params.default() : params.default };
}

const msg = params.logMessage || params.warningMessage || params.message;
if (c.program?.ci) {
if (
Array.isArray(params.choices) &&
typeof params.default !== 'undefined' &&
params.choices.includes(params.default)
) {
logDebug(`defaulting to choice '${params.default}' for prompt '${params.name}'`);
try {
if (
Array.isArray(params.choices) &&
typeof params.default !== 'undefined' &&
params.choices.includes(params.default)
) {
logDebug(`defaulting to choice '${params.default}' for prompt '${params.name}'`);

if (params.name) return Promise.resolve({ [params.name]: params.default });
if (params.name) return { [params.name]: params.default };
}
throw new Error(msg);
} catch (error) {
logWarning(error instanceof Error ? error.message : error);
}
return Promise.reject(`--ci option does not allow prompts. question: ${msg}.`);
}
if (msg && params.logMessage) logTask(msg, chalk().grey);
if (msg && params.warningMessage) logWarning(msg);
if (msg && params.warningMessage && !c.program.ci) logWarning(msg);

// allow passing in just { type: 'prompt', ... } instead of { type: 'prompt', name: 'prompt', ... }
const { type, name } = params;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rnv/core",
"version": "1.0.0-canary.9",
"version": "1.0.0-rc.3",
"description": "RNV Core SDK",
"keywords": [],
"homepage": "https://github.com/flexn-io/renative#readme",
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export const TASK_APP_CREATE = 'app create';
export const TASK_WORKSPACE_CONFIGURE = 'workspace configure';
export const TASK_CONFIGURE_SOFT = 'configureSoft';
export const TASK_KILL = 'kill';
export const TASK_EJECT = 'eject';

export const INJECTABLE_CONFIG_PROPS: Array<ConfigPropKey> = [
'id',
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/templates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ const _configureAppConfigs = async (c: RnvContext) => {
}
} else if (!appConfig.hidden) {
appConfig.common = appConfig.common || {};
//TODO: this needs to use bootstrap_metadata to work properly
// appConfig.common.title = c.files.project.config?.defaults?.title;
// appConfig.common.id = c.files.project.config?.defaults?.id;

Expand Down
14 changes: 7 additions & 7 deletions packages/engine-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rnv/engine-core",
"version": "1.0.0-canary.9",
"version": "1.0.0-rc.3",
"description": "ReNative Engine Core",
"keywords": [],
"homepage": "https://github.com/flexn-io/renative#readme",
Expand Down Expand Up @@ -29,17 +29,17 @@
"watch": "tsc --watch --preserveWatchOutput"
},
"dependencies": {
"@rnv/sdk-android": "1.0.0-canary.9",
"@rnv/sdk-apple": "1.0.0-canary.9",
"@rnv/sdk-kaios": "1.0.0-canary.9",
"@rnv/sdk-tizen": "1.0.0-canary.9",
"@rnv/sdk-webos": "1.0.0-canary.9",
"@rnv/sdk-android": "1.0.0-rc.3",
"@rnv/sdk-apple": "1.0.0-rc.3",
"@rnv/sdk-kaios": "1.0.0-rc.3",
"@rnv/sdk-tizen": "1.0.0-rc.3",
"@rnv/sdk-webos": "1.0.0-rc.3",
"iocane": "4.0.0",
"kill-port": "1.6.1",
"tar": "4.4.19"
},
"peerDependencies": {
"@rnv/core": "^1.0.0-canary.9"
"@rnv/core": "^1.0.0-rc.3"
},
"private": false,
"publishConfig": {
Expand Down
4 changes: 4 additions & 0 deletions packages/engine-core/src/__tests__/tasks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ test('Execute task.rnv.new', async () => {
expect(writeFileSync).toHaveBeenCalledTimes(1);
expect(writeFileSync).toHaveBeenCalledWith(undefined, {
currentTemplate: '@rnv/template-starter',
common: {
id: "com.test.app",
title: "testtitle",
},
defaults: {
supportedPlatforms: ['android', 'ios', 'web'],
},
Expand Down