chore(react-native): remove deprecated options for v17 (#19537)
This commit is contained in:
parent
6e2dba9c9e
commit
6e599d783d
@ -6610,14 +6610,6 @@
|
||||
"isExternal": false,
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"id": "download",
|
||||
"path": "/nx-api/expo/executors/download",
|
||||
"name": "download",
|
||||
"children": [],
|
||||
"isExternal": false,
|
||||
"disableCollapsible": false
|
||||
},
|
||||
{
|
||||
"id": "run",
|
||||
"path": "/nx-api/expo/executors/run",
|
||||
|
||||
@ -744,15 +744,6 @@
|
||||
"path": "/nx-api/expo/executors/build-list",
|
||||
"type": "executor"
|
||||
},
|
||||
"/nx-api/expo/executors/download": {
|
||||
"description": "Download an EAS build",
|
||||
"file": "generated/packages/expo/executors/download.json",
|
||||
"hidden": false,
|
||||
"name": "download",
|
||||
"originalFilePath": "/packages/expo/src/executors/download/schema.json",
|
||||
"path": "/nx-api/expo/executors/download",
|
||||
"type": "executor"
|
||||
},
|
||||
"/nx-api/expo/executors/run": {
|
||||
"description": "Run the Android app binary locally or run the iOS app binary locally",
|
||||
"file": "generated/packages/expo/executors/run.json",
|
||||
|
||||
@ -731,15 +731,6 @@
|
||||
"path": "expo/executors/build-list",
|
||||
"type": "executor"
|
||||
},
|
||||
{
|
||||
"description": "Download an EAS build",
|
||||
"file": "generated/packages/expo/executors/download.json",
|
||||
"hidden": false,
|
||||
"name": "download",
|
||||
"originalFilePath": "/packages/expo/src/executors/download/schema.json",
|
||||
"path": "expo/executors/download",
|
||||
"type": "executor"
|
||||
},
|
||||
{
|
||||
"description": "Run the Android app binary locally or run the iOS app binary locally",
|
||||
"file": "generated/packages/expo/executors/run.json",
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
{
|
||||
"name": "download",
|
||||
"implementation": "/packages/expo/src/executors/download/download.impl.ts",
|
||||
"schema": {
|
||||
"version": 2,
|
||||
"outputCapture": "direct-nodejs",
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxExpoDownloadEasBuild",
|
||||
"cli": "nx",
|
||||
"title": "Download EAS Build executor",
|
||||
"description": "Download an Expo Application Services (EAS) build.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"platform": {
|
||||
"enum": ["ios", "android"],
|
||||
"alias": "p",
|
||||
"description": "The platform to download the app",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"distribution": {
|
||||
"enum": ["store", "internal", "simulator"],
|
||||
"description": "Distribution of EAS build"
|
||||
},
|
||||
"channel": { "type": "string", "description": "Channel of EAS build" },
|
||||
"appVersion": {
|
||||
"type": "string",
|
||||
"description": "App version of EAS build"
|
||||
},
|
||||
"appBuildVersion": {
|
||||
"type": "string",
|
||||
"description": "App build version of EAS build"
|
||||
},
|
||||
"sdkVersion": {
|
||||
"type": "string",
|
||||
"description": "SDK version of EAS build"
|
||||
},
|
||||
"runtimeVersion": {
|
||||
"type": "string",
|
||||
"description": "Runtime version of EAS build"
|
||||
},
|
||||
"appIdentifier": {
|
||||
"type": "string",
|
||||
"description": "App identifier of EAS build"
|
||||
},
|
||||
"buildProfile": {
|
||||
"type": "string",
|
||||
"description": "Build profile of EAS build"
|
||||
},
|
||||
"gitCommitHash": {
|
||||
"type": "string",
|
||||
"description": "Git commit hash of EAS build"
|
||||
},
|
||||
"output": {
|
||||
"type": "string",
|
||||
"description": "Output directory for the download build"
|
||||
}
|
||||
},
|
||||
"required": ["output"],
|
||||
"presets": []
|
||||
},
|
||||
"description": "Download an EAS build",
|
||||
"aliases": [],
|
||||
"hidden": false,
|
||||
"path": "/packages/expo/src/executors/download/schema.json",
|
||||
"type": "executor"
|
||||
}
|
||||
@ -38,13 +38,6 @@
|
||||
"description": "Device name or UDID to build the app on. The value is not required if you have a single device connected.",
|
||||
"alias": "d"
|
||||
},
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to package.json (for React Native autolink).",
|
||||
"default": true,
|
||||
"x-deprecated": "Add sync-deps to dependsOn in project.json for this target instead",
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"port": {
|
||||
"type": "number",
|
||||
"description": "Port to start the Metro bundler on",
|
||||
|
||||
@ -84,12 +84,6 @@
|
||||
"offline": {
|
||||
"type": "boolean",
|
||||
"description": "Allows this command to run while offline"
|
||||
},
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to package.json (for React Native autolink).",
|
||||
"x-deprecated": "Add sync-deps to dependsOn in project.json for this target instead",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"examplesFile": "`project.json`:\n\n```json\n{\n \"name\": \"mobile\",\n //...\n \"targets\": {\n //...\n \"start\": {\n \"executor\": \"@nx/expo:start\",\n \"options\": {\n \"port\": 8081\n }\n }\n //...\n }\n}\n```\n\n```shell\nnx run mobile:start\n```\n\n## Examples\n\n{% tabs %}\n{% tab label=\"Specify starting on platform\" %}\nThe `ios`, `android` and `web` option allows you to start the server on different platforms.\n\nOpens your app in Expo Go in a currently running iOS simulator on your computer:\n\n```json\n \"start\": {\n \"executor\": \"@nx/expo:start\",\n \"options\": {\n \"port\": 8081,\n \"ios\": true\n }\n }\n```\n\nOpens your app in Expo Go on a connected Android device\n\n```json\n \"start\": {\n \"executor\": \"@nx/expo:start\",\n \"options\": {\n \"port\": 8081,\n \"android\": true\n }\n }\n```\n\nOpens your app in a web browser:\n\n```json\n \"start\": {\n \"executor\": \"@nx/expo:start\",\n \"options\": {\n \"port\": 8081,\n \"web\": true\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Specify the host\" %}\nThe `host` option allows you to specify the type of host to use. `lan` uses the local network; `tunnel` ues any network by tunnel through ngrok; `localhost` connects to the dev server over localhost.\n\n```json\n \"start\": {\n \"executor\": \"@nx/expo:start\",\n \"options\": {\n \"port\": 8081,\n \"host\": \"localhost\"\n }\n }\n```\n\n{% /tab %}\n{% tab label=\"Starts the server with cache reset\" %}\n\nThe `clear` option allows you to remove Metro bundler cache.\n\n```json\n \"start\": {\n \"executor\": \"@nx/expo:start\",\n \"options\": {\n \"port\": 8081,\n \"clear\": true\n }\n }\n```\n\n{% /tab %}\n{% /tabs %}\n\n---\n",
|
||||
|
||||
@ -20,21 +20,6 @@
|
||||
{ "name": "Build Android with a specific mode", "keys": ["mode"] }
|
||||
],
|
||||
"properties": {
|
||||
"apk": {
|
||||
"type": "boolean",
|
||||
"description": "Generate apk file(s) rather than a bundle (`.aab`).",
|
||||
"x-deprecated": "Use `tasks` option instead, e.g. `tasks=['bundleRelease']` to generate aab, `tasks=['assembleDebug']` to generate apk. Will be removed in Nx 17."
|
||||
},
|
||||
"debug": {
|
||||
"type": "boolean",
|
||||
"description": "Generate a debug build instead of a release build.",
|
||||
"x-deprecated": "Use `mode` option instead, e.g. `mode='debug'`. Deprecated from @react-native-community/cli. Will be removed in Nx 17."
|
||||
},
|
||||
"gradleTask": {
|
||||
"type": "string",
|
||||
"description": "Override default gradle task incase of multi build variants",
|
||||
"x-deprecated": "Use `tasks` option instead, e.g. `tasks=['assembleDebug']`. Will be removed in Nx 17."
|
||||
},
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"description": "Specify your app's build variant",
|
||||
@ -42,12 +27,6 @@
|
||||
"examples": ["debug", "release"],
|
||||
"x-priority": "important"
|
||||
},
|
||||
"packager": {
|
||||
"type": "boolean",
|
||||
"description": "Launch packager while building",
|
||||
"default": true,
|
||||
"x-deprecated": "Run `nx run <project>:start` instead. Will be removed in Nx 17."
|
||||
},
|
||||
"port": {
|
||||
"type": "number",
|
||||
"description": "The port where the packager server is listening on.",
|
||||
@ -85,12 +64,6 @@
|
||||
"type": "boolean",
|
||||
"description": "Explicitly select build type and flavour to use before running a build"
|
||||
},
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
||||
"default": true,
|
||||
"x-deprecated": "Add sync-deps to dependsOn instead"
|
||||
},
|
||||
"resetCache": {
|
||||
"type": "boolean",
|
||||
"description": "Resets metro cache.",
|
||||
|
||||
@ -74,28 +74,10 @@
|
||||
],
|
||||
"description": "Custom params that will be passed to xcodebuild command."
|
||||
},
|
||||
"install": {
|
||||
"type": "boolean",
|
||||
"description": "Runs `pod install` for native modules before building iOS app.",
|
||||
"x-deprecated": "Add pod-install to dependsOn in project.json for this target instead",
|
||||
"default": true
|
||||
},
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
||||
"x-deprecated": "Add sync-deps to dependsOn in project.json for this target instead",
|
||||
"default": true
|
||||
},
|
||||
"resetCache": {
|
||||
"type": "boolean",
|
||||
"description": "Resets metro cache.",
|
||||
"default": false
|
||||
},
|
||||
"packager": {
|
||||
"type": "boolean",
|
||||
"description": "Launch packager while building",
|
||||
"default": true,
|
||||
"x-deprecated": "Run `nx run <project>:start` instead. Will be removed in Nx 17."
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
|
||||
@ -22,18 +22,6 @@
|
||||
{ "name": "Run Android without metro cache", "keys": ["resetCache"] }
|
||||
],
|
||||
"properties": {
|
||||
"variant": {
|
||||
"type": "string",
|
||||
"description": "Specify your app's build variant (e.g. `debug`, `release`).",
|
||||
"default": "debug",
|
||||
"examples": ["debug", "release"],
|
||||
"x-deprecated": "Deprecated from @react-native-community/cli, use mode instead, e.g. mode=debug. Will be remove in Nx 17."
|
||||
},
|
||||
"jetifier": {
|
||||
"type": "boolean",
|
||||
"description": "Run Jetifier – the AndroidX transition tool. By default it runs before Gradle to ease working with libraries that don't support AndroidX yet.",
|
||||
"x-deprecated": "Deprecated from @react-native-community/cli. Will be remove in Nx 17."
|
||||
},
|
||||
"appId": {
|
||||
"type": "string",
|
||||
"description": "Specify an `applicationId` to launch after build. If not specified, `package` from `AndroidManifest.xml` will be used."
|
||||
|
||||
@ -16,13 +16,6 @@
|
||||
{ "name": "Run iOS on a device with udid", "keys": ["udid"] }
|
||||
],
|
||||
"properties": {
|
||||
"xcodeConfiguration": {
|
||||
"type": "string",
|
||||
"description": "Explicitly set the Xcode configuration to use.",
|
||||
"default": "Debug",
|
||||
"examples": ["Debug", "Release"],
|
||||
"x-deprecated": "Use `mode` instead. Deprecated from @react-native-community/cli. Will be removed in Nx 17."
|
||||
},
|
||||
"simulator": {
|
||||
"type": "string",
|
||||
"description": "Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: \"iPhone 6 (10.0)\"",
|
||||
|
||||
@ -24,12 +24,6 @@
|
||||
"type": "string",
|
||||
"description": "The pattern of files to look at. It can be a specific file, or any valid glob. Note: if using the CLI, globs with `**/*...` must be escaped with quotes",
|
||||
"default": "**/*.stories.@(js|jsx|ts|tsx|md)"
|
||||
},
|
||||
"silent": {
|
||||
"type": "boolean",
|
||||
"description": "Silences output.",
|
||||
"default": false,
|
||||
"x-deprecated": "No longer used. It will be silent as default."
|
||||
}
|
||||
},
|
||||
"required": ["searchDir", "outputFile", "pattern"],
|
||||
|
||||
@ -383,7 +383,6 @@
|
||||
- [update](/nx-api/expo/executors/update)
|
||||
- [build](/nx-api/expo/executors/build)
|
||||
- [build-list](/nx-api/expo/executors/build-list)
|
||||
- [download](/nx-api/expo/executors/download)
|
||||
- [run](/nx-api/expo/executors/run)
|
||||
- [start](/nx-api/expo/executors/start)
|
||||
- [sync-deps](/nx-api/expo/executors/sync-deps)
|
||||
|
||||
@ -15,11 +15,6 @@
|
||||
"schema": "./src/executors/build-list/schema.json",
|
||||
"description": "List all EAS builds for your Expo project"
|
||||
},
|
||||
"download": {
|
||||
"implementation": "./src/executors/download/download.impl",
|
||||
"schema": "./src/executors/download/schema.json",
|
||||
"description": "Download an EAS build"
|
||||
},
|
||||
"run": {
|
||||
"implementation": "./src/executors/run/run.impl",
|
||||
"schema": "./src/executors/run/schema.json",
|
||||
@ -77,11 +72,6 @@
|
||||
"schema": "./src/executors/build-list/schema.json",
|
||||
"description": "List all EAS builds for your Expo project"
|
||||
},
|
||||
"download": {
|
||||
"implementation": "./src/executors/download/compat",
|
||||
"schema": "./src/executors/download/schema.json",
|
||||
"description": "Download an EAS build"
|
||||
},
|
||||
"run": {
|
||||
"implementation": "./src/executors/run/compat",
|
||||
"schema": "./src/executors/run/schema.json",
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
export { expoInitGenerator } from './src/generators/init/init';
|
||||
export { expoApplicationGenerator } from './src/generators/application/application';
|
||||
export { withNxMetro } from './plugins/with-nx-metro';
|
||||
export { withNxWebpack } from './plugins/with-nx-webpack';
|
||||
|
||||
@ -31,8 +31,6 @@
|
||||
"fs-extra": "^11.1.0",
|
||||
"metro-config": "0.76.7",
|
||||
"metro-resolver": "0.76.7",
|
||||
"node-fetch": "^2.6.7",
|
||||
"tar-fs": "^2.1.1",
|
||||
"tslib": "^2.3.0",
|
||||
"tsconfig-paths": "^4.1.2",
|
||||
"tsconfig-paths-webpack-plugin": "^4.0.0",
|
||||
|
||||
@ -8,10 +8,6 @@ import { getResolveRequest } from './metro-resolver';
|
||||
interface WithNxOptions {
|
||||
debug?: boolean;
|
||||
extensions?: string[];
|
||||
/**
|
||||
* @deprecated TODO(v17) in the metro.config.js, pass in to the getDefaultConfig instead: getDefaultConfig(__dirname)
|
||||
*/
|
||||
projectRoot?: string;
|
||||
watchFolders?: string[];
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +1,8 @@
|
||||
import { ExecutorContext, names, output } from '@nx/devkit';
|
||||
import { normalize, sep, resolve as pathResolve, dirname } from 'path';
|
||||
import { ExecutorContext, names } from '@nx/devkit';
|
||||
import { resolve as pathResolve } from 'path';
|
||||
import { ChildProcess, fork } from 'child_process';
|
||||
|
||||
import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink';
|
||||
import { unzipBuild } from '../download/download.impl';
|
||||
|
||||
import { ExpoEasBuildOptions } from './schema';
|
||||
import { removeSync } from 'fs-extra';
|
||||
|
||||
export interface ReactNativeBuildOutput {
|
||||
success: boolean;
|
||||
@ -22,22 +18,7 @@ export default async function* buildExecutor(
|
||||
context.projectsConfigurations.projects[context.projectName].root;
|
||||
|
||||
try {
|
||||
// remove the output app if it already existed
|
||||
if (options.local && options.output) {
|
||||
removeSync(options.output);
|
||||
if (options.output.endsWith('.tar.gz')) {
|
||||
// remove unzipped app if it already existed
|
||||
removeSync(options.output.replace('.tar.gz', '.app'));
|
||||
}
|
||||
}
|
||||
|
||||
await runCliBuild(context.root, projectRoot, options);
|
||||
|
||||
// unzip the build if it's a tar.gz
|
||||
if (options.local && options.output && options.output.endsWith('.tar.gz')) {
|
||||
const outputDirectory = dirname(options.output);
|
||||
await unzipBuild(options.output, outputDirectory);
|
||||
}
|
||||
yield { success: true };
|
||||
} finally {
|
||||
if (childProcess) {
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
import { convertNxExecutor } from '@nx/devkit';
|
||||
|
||||
import downloadExecutor from './download.impl';
|
||||
|
||||
export default convertNxExecutor(downloadExecutor);
|
||||
@ -1,146 +0,0 @@
|
||||
import { ExecutorContext, logger, names } from '@nx/devkit';
|
||||
import {
|
||||
copyFile,
|
||||
createReadStream,
|
||||
createWriteStream,
|
||||
existsSync,
|
||||
mkdirSync,
|
||||
removeSync,
|
||||
} from 'fs-extra';
|
||||
import fetch from 'node-fetch';
|
||||
import { promisify } from 'util';
|
||||
import { pipeline } from 'stream';
|
||||
import * as chalk from 'chalk';
|
||||
import { join } from 'path';
|
||||
import * as tar from 'tar-fs';
|
||||
import { createUnzip } from 'zlib';
|
||||
|
||||
import { ensureNodeModulesSymlink } from '../../utils/ensure-node-modules-symlink';
|
||||
|
||||
import { ExpoEasDownloadOptions } from './schema';
|
||||
import { runCliBuildList } from '../build-list/build-list.impl';
|
||||
import { BuildFragment } from '../build-list/build-fragment';
|
||||
|
||||
export interface ReactNativeDownloadOutput {
|
||||
success: boolean;
|
||||
}
|
||||
|
||||
const streamPipeline = promisify(pipeline);
|
||||
|
||||
/**
|
||||
* @deprecated TODO(v17) this executor is to be removed in NX 17. It is no longer used.
|
||||
* This executor downloads the latest EAS build.
|
||||
* It calls the build list executor to list EAS builds with options passed in.
|
||||
*/
|
||||
export default async function* downloadExecutor(
|
||||
options: ExpoEasDownloadOptions,
|
||||
context: ExecutorContext
|
||||
): AsyncGenerator<ReactNativeDownloadOutput> {
|
||||
const projectRoot =
|
||||
context.projectsConfigurations.projects[context.projectName].root;
|
||||
ensureNodeModulesSymlink(context.root, projectRoot);
|
||||
|
||||
const build = await getBuild(context.root, projectRoot, options);
|
||||
const buildUrl = build?.artifacts?.buildUrl;
|
||||
if (!buildUrl) {
|
||||
throw new Error(`No build URL found.`);
|
||||
}
|
||||
|
||||
if (!existsSync(options.output)) {
|
||||
mkdirSync(options.output, { recursive: true });
|
||||
}
|
||||
|
||||
const downloadFileName = buildUrl.split('/').pop();
|
||||
const downloadFilePath = join(options.output, downloadFileName);
|
||||
await downloadBuild(buildUrl, downloadFilePath);
|
||||
|
||||
const appExtension = getAppExtension(build.platform, downloadFileName);
|
||||
const appName = `${names(build.project?.name).className}${appExtension}`;
|
||||
const outputFilePath = join(options.output, appName);
|
||||
|
||||
if (existsSync(outputFilePath)) {
|
||||
removeSync(outputFilePath);
|
||||
}
|
||||
|
||||
if (downloadFileName.endsWith('.tar.gz')) {
|
||||
await unzipBuild(downloadFilePath, options.output);
|
||||
} else {
|
||||
await copyBuildFile(downloadFilePath, outputFilePath);
|
||||
}
|
||||
|
||||
logger.info(`Successfully download the build to ${outputFilePath}`);
|
||||
|
||||
yield { success: true };
|
||||
}
|
||||
|
||||
async function downloadBuild(buildUrl: string, output: string) {
|
||||
const response = await fetch(buildUrl);
|
||||
|
||||
if (!response.ok)
|
||||
throw new Error(
|
||||
`Unable to download the build ${buildUrl}. Error: ${response.statusText}`
|
||||
);
|
||||
|
||||
return streamPipeline(response.body, createWriteStream(output));
|
||||
}
|
||||
|
||||
export async function getBuild(
|
||||
workspaceRoot: string,
|
||||
projectRoot: string,
|
||||
options: ExpoEasDownloadOptions
|
||||
) {
|
||||
const buildList = await runCliBuildList(workspaceRoot, projectRoot, {
|
||||
...options,
|
||||
interactive: false,
|
||||
json: true,
|
||||
status: 'finished',
|
||||
limit: 1,
|
||||
});
|
||||
const builds: BuildFragment[] = JSON.parse(buildList);
|
||||
if (!builds.length) {
|
||||
throw new Error(
|
||||
`No EAS build found. Please check expo.dev to make sure your build is finished.`
|
||||
);
|
||||
}
|
||||
logger.info(`${chalk.bold.cyan('info')} Found build: ${buildList}`);
|
||||
|
||||
return builds[0];
|
||||
}
|
||||
|
||||
export function getAppExtension(
|
||||
platform: string,
|
||||
downloadFileName: string
|
||||
): string {
|
||||
platform = platform.toLowerCase();
|
||||
if (platform === 'ios') {
|
||||
return '.app';
|
||||
}
|
||||
if (downloadFileName.includes('.')) {
|
||||
return `.${downloadFileName.split('.').pop()}`;
|
||||
}
|
||||
throw new Error(`Invalid build name found: ${downloadFileName}`);
|
||||
}
|
||||
|
||||
export function unzipBuild(
|
||||
downloadFilePath: string,
|
||||
outputDirectoryPath: string
|
||||
) {
|
||||
const unzip = createUnzip();
|
||||
const extract = tar.extract(outputDirectoryPath);
|
||||
return streamPipeline(createReadStream(downloadFilePath), unzip, extract);
|
||||
}
|
||||
|
||||
export function copyBuildFile(
|
||||
downloadFilePath: string,
|
||||
outputFilePath: string
|
||||
) {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
copyFile(downloadFilePath, outputFilePath, (error) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
export interface ExpoEasDownloadOptions extends ExpoEasBuildListOptions {
|
||||
output: string;
|
||||
}
|
||||
@ -1,59 +0,0 @@
|
||||
{
|
||||
"version": 2,
|
||||
"outputCapture": "direct-nodejs",
|
||||
"$schema": "http://json-schema.org/schema",
|
||||
"$id": "NxExpoDownloadEasBuild",
|
||||
"cli": "nx",
|
||||
"title": "Download EAS Build executor",
|
||||
"description": "Download an Expo Application Services (EAS) build.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"platform": {
|
||||
"enum": ["ios", "android"],
|
||||
"alias": "p",
|
||||
"description": "The platform to download the app",
|
||||
"x-priority": "important"
|
||||
},
|
||||
"distribution": {
|
||||
"enum": ["store", "internal", "simulator"],
|
||||
"description": "Distribution of EAS build"
|
||||
},
|
||||
"channel": {
|
||||
"type": "string",
|
||||
"description": "Channel of EAS build"
|
||||
},
|
||||
"appVersion": {
|
||||
"type": "string",
|
||||
"description": "App version of EAS build"
|
||||
},
|
||||
"appBuildVersion": {
|
||||
"type": "string",
|
||||
"description": "App build version of EAS build"
|
||||
},
|
||||
"sdkVersion": {
|
||||
"type": "string",
|
||||
"description": "SDK version of EAS build"
|
||||
},
|
||||
"runtimeVersion": {
|
||||
"type": "string",
|
||||
"description": "Runtime version of EAS build"
|
||||
},
|
||||
"appIdentifier": {
|
||||
"type": "string",
|
||||
"description": "App identifier of EAS build"
|
||||
},
|
||||
"buildProfile": {
|
||||
"type": "string",
|
||||
"description": "Build profile of EAS build"
|
||||
},
|
||||
"gitCommitHash": {
|
||||
"type": "string",
|
||||
"description": "Git commit hash of EAS build"
|
||||
},
|
||||
"output": {
|
||||
"type": "string",
|
||||
"description": "Output directory for the download build"
|
||||
}
|
||||
},
|
||||
"required": ["output"]
|
||||
}
|
||||
4
packages/expo/src/executors/run/schema.d.ts
vendored
4
packages/expo/src/executors/run/schema.d.ts
vendored
@ -6,10 +6,6 @@
|
||||
export interface ExpoRunOptions {
|
||||
// nx options
|
||||
platform: 'ios' | 'android';
|
||||
/**
|
||||
* @deprecated TODO(v17) Add sync-deps to dependsOn in project.json for this target instead
|
||||
*/
|
||||
sync: boolean; // default is true
|
||||
install?: boolean; // default is true
|
||||
clean?: boolean; // default is false
|
||||
|
||||
|
||||
@ -35,13 +35,6 @@
|
||||
"description": "Device name or UDID to build the app on. The value is not required if you have a single device connected.",
|
||||
"alias": "d"
|
||||
},
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to package.json (for React Native autolink).",
|
||||
"default": true,
|
||||
"x-deprecated": "Add sync-deps to dependsOn in project.json for this target instead",
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"port": {
|
||||
"type": "number",
|
||||
"description": "Port to start the Metro bundler on",
|
||||
|
||||
@ -19,9 +19,4 @@ export interface ExpoStartOptions {
|
||||
localhost?: boolean;
|
||||
tunnel?: boolean;
|
||||
offline?: boolean;
|
||||
|
||||
/**
|
||||
* @deprecated TODO(v17) Add sync-deps to dependsOn in project.json for this target instead
|
||||
*/
|
||||
sync?: boolean; // default is true
|
||||
}
|
||||
|
||||
@ -87,12 +87,6 @@
|
||||
"offline": {
|
||||
"type": "boolean",
|
||||
"description": "Allows this command to run while offline"
|
||||
},
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to package.json (for React Native autolink).",
|
||||
"x-deprecated": "Add sync-deps to dependsOn in project.json for this target instead",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
"examplesFile": "../../../docs/start-examples.md"
|
||||
|
||||
@ -73,16 +73,6 @@ function getTargets(options: NormalizedSchema) {
|
||||
options: {},
|
||||
};
|
||||
|
||||
/**
|
||||
* @deprecated TODO(v17) this executor is no longer used, to be removed in v17
|
||||
*/
|
||||
architect['download'] = {
|
||||
executor: '@nx/expo:download',
|
||||
options: {
|
||||
output: `${options.appProjectRoot}/dist`,
|
||||
},
|
||||
};
|
||||
|
||||
architect['sync-deps'] = {
|
||||
executor: '@nx/expo:sync-deps',
|
||||
options: {},
|
||||
|
||||
@ -8,10 +8,6 @@ import { getResolveRequest } from './metro-resolver';
|
||||
interface WithNxOptions {
|
||||
debug?: boolean;
|
||||
extensions?: string[];
|
||||
/**
|
||||
* @deprecated TODO(v17) in the metro.config.js, pass in to the getDefaultConfig instead: getDefaultConfig(__dirname)
|
||||
*/
|
||||
projectRoot?: string;
|
||||
watchFolders?: string[];
|
||||
}
|
||||
|
||||
|
||||
@ -5,29 +5,10 @@ import { ReactNativeStartOptions } from '../start/schema';
|
||||
|
||||
export interface ReactNativeBuildAndroidOptions
|
||||
extends ReactNativeStartOptions {
|
||||
/**
|
||||
* @deprecated, use tasks instead. e.g. tasks=['bundleRelease'] for aab, and tasks=['assembleRelease'] for apk. Will be removed in nx 17.
|
||||
*/
|
||||
apk?: boolean;
|
||||
/**
|
||||
* @deprecated, use mode='debug' instead. Will be removed in nx 17.
|
||||
*/
|
||||
debug?: boolean;
|
||||
/**
|
||||
* @deprecated, use tasks instead instead. Will be removed in nx 17.
|
||||
*/
|
||||
gradleTask?: string;
|
||||
|
||||
// react native options
|
||||
mode: string; // default is debug
|
||||
activeArchOnly: boolean; // default is false
|
||||
tasks?: string | Array<string>;
|
||||
extraParams?: Array<string>;
|
||||
interactive: boolean;
|
||||
|
||||
// nx options
|
||||
// @deprecated, no longer used
|
||||
packager: boolean; // default is true
|
||||
// @deprecated, add to sync-deps to dependsOn
|
||||
sync: boolean;
|
||||
}
|
||||
|
||||
@ -26,21 +26,6 @@
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"apk": {
|
||||
"type": "boolean",
|
||||
"description": "Generate apk file(s) rather than a bundle (`.aab`).",
|
||||
"x-deprecated": "Use `tasks` option instead, e.g. `tasks=['bundleRelease']` to generate aab, `tasks=['assembleDebug']` to generate apk. Will be removed in Nx 17."
|
||||
},
|
||||
"debug": {
|
||||
"type": "boolean",
|
||||
"description": "Generate a debug build instead of a release build.",
|
||||
"x-deprecated": "Use `mode` option instead, e.g. `mode='debug'`. Deprecated from @react-native-community/cli. Will be removed in Nx 17."
|
||||
},
|
||||
"gradleTask": {
|
||||
"type": "string",
|
||||
"description": "Override default gradle task incase of multi build variants",
|
||||
"x-deprecated": "Use `tasks` option instead, e.g. `tasks=['assembleDebug']`. Will be removed in Nx 17."
|
||||
},
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"description": "Specify your app's build variant",
|
||||
@ -48,12 +33,6 @@
|
||||
"examples": ["debug", "release"],
|
||||
"x-priority": "important"
|
||||
},
|
||||
"packager": {
|
||||
"type": "boolean",
|
||||
"description": "Launch packager while building",
|
||||
"default": true,
|
||||
"x-deprecated": "Run `nx run <project>:start` instead. Will be removed in Nx 17."
|
||||
},
|
||||
"port": {
|
||||
"type": "number",
|
||||
"description": "The port where the packager server is listening on.",
|
||||
@ -91,12 +70,6 @@
|
||||
"type": "boolean",
|
||||
"description": "Explicitly select build type and flavour to use before running a build"
|
||||
},
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
||||
"default": true,
|
||||
"x-deprecated": "Add sync-deps to dependsOn instead"
|
||||
},
|
||||
"resetCache": {
|
||||
"type": "boolean",
|
||||
"description": "Resets metro cache.",
|
||||
|
||||
@ -14,12 +14,4 @@ export interface ReactNativeBuildIosOptions extends ReactNativeStartOptions {
|
||||
xcconfig?: string;
|
||||
buildFolder?: string;
|
||||
extraParams?: string;
|
||||
|
||||
// nx options
|
||||
// @deprecated, no longer used
|
||||
packager: boolean; // default is true
|
||||
// @deprecated, add to pod-install to dependsOn
|
||||
install: boolean; // default is true
|
||||
// @deprecated, add to sync-deps to dependsOn
|
||||
sync: boolean; // default is true
|
||||
}
|
||||
|
||||
@ -80,28 +80,10 @@
|
||||
],
|
||||
"description": "Custom params that will be passed to xcodebuild command."
|
||||
},
|
||||
"install": {
|
||||
"type": "boolean",
|
||||
"description": "Runs `pod install` for native modules before building iOS app.",
|
||||
"x-deprecated": "Add pod-install to dependsOn in project.json for this target instead",
|
||||
"default": true
|
||||
},
|
||||
"sync": {
|
||||
"type": "boolean",
|
||||
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
|
||||
"x-deprecated": "Add sync-deps to dependsOn in project.json for this target instead",
|
||||
"default": true
|
||||
},
|
||||
"resetCache": {
|
||||
"type": "boolean",
|
||||
"description": "Resets metro cache.",
|
||||
"default": false
|
||||
},
|
||||
"packager": {
|
||||
"type": "boolean",
|
||||
"description": "Launch packager while building",
|
||||
"default": true,
|
||||
"x-deprecated": "Run `nx run <project>:start` instead. Will be removed in Nx 17."
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
|
||||
@ -21,7 +21,7 @@ export default async function* runAndroidExecutor(
|
||||
context.projectsConfigurations.projects[context.projectName].root;
|
||||
chmodAndroidGradlewFiles(join(projectRoot, 'android'));
|
||||
|
||||
if (options.packager && options.mode !== 'Release') {
|
||||
if (options.mode !== 'Release') {
|
||||
const startResults = startExecutor(
|
||||
{
|
||||
port: options.port,
|
||||
|
||||
@ -4,17 +4,6 @@ import { ReactNativeStartOptions } from '../start/schema';
|
||||
// part of options from https://github.com/react-native-community/cli/blob/main/packages/cli-platform-android/src/commands/runAndroid/index.ts
|
||||
export interface ReactNativeRunAndroidOptions
|
||||
extends ReactNativeBuildAndroidOptions {
|
||||
/**
|
||||
* @deprecated TODO(v17) use mode instead
|
||||
*/
|
||||
variant: string;
|
||||
/**
|
||||
* @deprecated TODO(v17) no longer supported in react native cli
|
||||
* https://github.com/react-native-community/cli/commit/7c003f2b1d9d80ec5c167614ba533a004272c685
|
||||
*/
|
||||
jetifier: boolean;
|
||||
|
||||
// react native options
|
||||
appId: string;
|
||||
appIdSuffix: string;
|
||||
mainActiviy: string;
|
||||
|
||||
@ -22,18 +22,6 @@
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"variant": {
|
||||
"type": "string",
|
||||
"description": "Specify your app's build variant (e.g. `debug`, `release`).",
|
||||
"default": "debug",
|
||||
"examples": ["debug", "release"],
|
||||
"x-deprecated": "Deprecated from @react-native-community/cli, use mode instead, e.g. mode=debug. Will be remove in Nx 17."
|
||||
},
|
||||
"jetifier": {
|
||||
"type": "boolean",
|
||||
"description": "Run Jetifier – the AndroidX transition tool. By default it runs before Gradle to ease working with libraries that don't support AndroidX yet.",
|
||||
"x-deprecated": "Deprecated from @react-native-community/cli. Will be remove in Nx 17."
|
||||
},
|
||||
"appId": {
|
||||
"type": "string",
|
||||
"description": "Specify an `applicationId` to launch after build. If not specified, `package` from `AndroidManifest.xml` will be used."
|
||||
|
||||
@ -21,7 +21,7 @@ export default async function* runIosExecutor(
|
||||
const projectRoot =
|
||||
context.projectsConfigurations.projects[context.projectName].root;
|
||||
|
||||
if (options.packager && options.mode !== 'Release') {
|
||||
if (options.mode !== 'Release') {
|
||||
const startResults = startExecutor(
|
||||
{
|
||||
port: options.port,
|
||||
|
||||
@ -3,10 +3,5 @@ import { ReactNativeStartOptions } from '../start/schema';
|
||||
|
||||
// part of options form https://github.com/react-native-community/cli/blob/main/packages/cli-platform-ios/src/commands/runIOS/index.ts
|
||||
export interface ReactNativeRunIosOptions extends ReactNativeBuildIosOptions {
|
||||
/**
|
||||
* @deprecated TODO(v17) use mode instead, will be removed in nx 17.
|
||||
*/
|
||||
xcodeConfiguration?: string;
|
||||
|
||||
binaryPath?: string;
|
||||
}
|
||||
|
||||
@ -22,13 +22,6 @@
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"xcodeConfiguration": {
|
||||
"type": "string",
|
||||
"description": "Explicitly set the Xcode configuration to use.",
|
||||
"default": "Debug",
|
||||
"examples": ["Debug", "Release"],
|
||||
"x-deprecated": "Use `mode` instead. Deprecated from @react-native-community/cli. Will be removed in Nx 17."
|
||||
},
|
||||
"simulator": {
|
||||
"type": "string",
|
||||
"description": "Explicitly set simulator to use. Optionally include iOS version between parenthesis at the end to match an exact version: \"iPhone 6 (10.0)\"",
|
||||
|
||||
@ -2,8 +2,4 @@ export interface ReactNativeStorybookOptions {
|
||||
searchDir: string[];
|
||||
outputFile: string;
|
||||
pattern: string;
|
||||
/**
|
||||
* @deprecated TODO(v17) no longer used going to be removed in 17
|
||||
*/
|
||||
silent: boolean;
|
||||
}
|
||||
|
||||
@ -23,12 +23,6 @@
|
||||
"type": "string",
|
||||
"description": "The pattern of files to look at. It can be a specific file, or any valid glob. Note: if using the CLI, globs with `**/*...` must be escaped with quotes",
|
||||
"default": "**/*.stories.@(js|jsx|ts|tsx|md)"
|
||||
},
|
||||
"silent": {
|
||||
"type": "boolean",
|
||||
"description": "Silences output.",
|
||||
"default": false,
|
||||
"x-deprecated": "No longer used. It will be silent as default."
|
||||
}
|
||||
},
|
||||
"required": ["searchDir", "outputFile", "pattern"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user