@expo/cli 0.23.3 → 0.23.4
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/README.md +33 -24
- package/build/bin/cli +1 -1
- package/build/src/start/index.js +1 -1
- package/build/src/start/index.js.map +1 -1
- package/build/src/start/resolveOptions.js +3 -0
- package/build/src/start/resolveOptions.js.map +1 -1
- package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
- package/build/src/utils/telemetry/utils/context.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -9,29 +9,37 @@
|
|
|
9
9
|
<p align="center">The fastest way to build and run universal React Native apps for Android, iOS, and the web</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
+
<a aria-label="expo documentation" href="https://docs.expo.dev/more/expo-cli/">📚 Read the Documentation</a>
|
|
13
|
+
 • 
|
|
14
|
+
<a aria-label="expo documentation" href="https://expo.dev/blog">Learn more on our blog</a>
|
|
15
|
+
 • 
|
|
16
|
+
<a aria-label="Contribute to Expo CLI" href="#contributing">Contribute to Expo CLI</a>
|
|
17
|
+
</p>
|
|
12
18
|
|
|
19
|
+
<p align="center">
|
|
13
20
|
<a aria-label="Join the Expo Discord" href="https://discord.gg/4gtbPAdpaE" target="_blank">
|
|
14
|
-
<img alt="Discord" src="https://img.shields.io/discord/695411232856997968.svg?style=
|
|
21
|
+
<img alt="Discord" src="https://img.shields.io/discord/695411232856997968.svg?style=for-the-badge&color=5865F2&logo=discord&logoColor=FFFFFF" />
|
|
15
22
|
</a>
|
|
16
|
-
<a aria-label="Browse the Expo forums" href="https://forums.expo.dev" target="_blank">
|
|
17
|
-
<img alt="" src="https://img.shields.io/badge/Ask%20Questions%20-000.svg?style=flat-square&logo=discourse&logoWidth=15&labelColor=000000&color=000000">
|
|
18
|
-
</a>
|
|
19
|
-
|
|
20
23
|
</p>
|
|
21
24
|
|
|
22
25
|
<p align="center">
|
|
23
|
-
<a aria-label="expo
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<a aria-label="Follow @expo on
|
|
30
|
-
<img
|
|
31
|
-
</a
|
|
32
|
-
<a aria-label="Follow
|
|
33
|
-
<img
|
|
26
|
+
<a aria-label="Follow @expo on X" href="https://x.com/intent/follow?screen_name=expo" target="_blank">
|
|
27
|
+
<img alt="Expo on X" src="https://img.shields.io/badge/X-000000?style=for-the-badge&logo=x&logoColor=white" target="_blank" />
|
|
28
|
+
</a>
|
|
29
|
+
<a aria-label="Follow @expo on GitHub" href="https://github.com/expo" target="_blank">
|
|
30
|
+
<img alt="Expo on GitHub" src="https://img.shields.io/badge/GitHub-222222?style=for-the-badge&logo=github&logoColor=white" target="_blank" />
|
|
31
|
+
</a>
|
|
32
|
+
<a aria-label="Follow @expo on Reddit" href="https://www.reddit.com/r/expo/" target="_blank">
|
|
33
|
+
<img alt="Expo on Reddit" src="https://img.shields.io/badge/Reddit-FF4500?style=for-the-badge&logo=reddit&logoColor=white" target="_blank" />
|
|
34
|
+
</a>
|
|
35
|
+
<a aria-label="Follow @expo on Bluesky" href="https://bsky.app/profile/expo.dev" target="_blank">
|
|
36
|
+
<img alt="Expo on LinkedIn" src="https://img.shields.io/badge/Bluesky-1DA1F2?style=for-the-badge&logo=bluesky&logoColor=white" target="_blank" />
|
|
37
|
+
</a>
|
|
38
|
+
<a aria-label="Follow @expo on LinkedIn" href="https://www.linkedin.com/company/expo-dev" target="_blank">
|
|
39
|
+
<img alt="Expo on LinkedIn" src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=LinkedIn&logoColor=white" target="_blank" />
|
|
34
40
|
</a>
|
|
41
|
+
|
|
42
|
+
<p align="center">⭐️ Be sure to star the Expo GitHub repo if you enjoy using the project! ⭐️</p>
|
|
35
43
|
</p>
|
|
36
44
|
|
|
37
45
|
---
|
|
@@ -49,9 +57,9 @@ npx expo
|
|
|
49
57
|
This CLI has the following purposes:
|
|
50
58
|
|
|
51
59
|
- Be a minimal interface for starting a local development server that emulates a production EAS Updates server. The development server is the proxy between a native runtime (Expo Go, Dev Client) and a JS Bundler (Metro, Webpack).
|
|
52
|
-
- To accomplish secure manifest signing
|
|
60
|
+
- To accomplish secure manifest signing for the web, like AsyncStorage or Permissions where both require https/SSL, we need an authenticated Expo account. This is the only reason we include the authentication commands `login`, `logout`, `whoami`, `register`. Standard web CLIs don't have authentication commands because they either don't set up https or they use emulation via packages like `devcert`.
|
|
53
61
|
- Orchestrating various native tools like Xcode, `Simulator.app`, Android Studio, ADB, etc. to make native builds as painless as possible. `run:ios`, `run:android` commands.
|
|
54
|
-
- Implementing a versioned `prebuild` command that can reliably work with a project for long periods of time. Prebuild is like a bundler for native code, it generates the
|
|
62
|
+
- Implementing a versioned `prebuild` command that can reliably work with a project for long periods of time. Prebuild is like a bundler for native code, it generates the **android** and **ios** folders based on the project Expo config (**app.json**).
|
|
55
63
|
- `npx expo config` is auxiliary to `npx expo prebuild` and used for debugging/introspection.
|
|
56
64
|
- Installing versioned libraries with `npx expo install` this is a minimal utility born out of pure necessity since versioning in React Native is hard to get right.
|
|
57
65
|
|
|
@@ -63,7 +71,7 @@ To develop the CLI run (defaults to watch mode):
|
|
|
63
71
|
yarn build
|
|
64
72
|
```
|
|
65
73
|
|
|
66
|
-
We highly recommend setting up an alias for the Expo CLI so you can try it in projects all around your computer. Open your
|
|
74
|
+
We highly recommend setting up an alias for the Expo CLI so you can try it in projects all around your computer. Open your **.zshrc** or other config file and add:
|
|
67
75
|
|
|
68
76
|
```
|
|
69
77
|
alias nexpo="/path/to/expo/packages/@expo/cli/build/bin/cli"
|
|
@@ -75,7 +83,7 @@ Then use it with `nexpo` like `nexpo config`. You can also set up a debug versio
|
|
|
75
83
|
alias expo-inspect="node --inspect /path/to/expo/packages/@expo/cli/build/bin/cli"
|
|
76
84
|
```
|
|
77
85
|
|
|
78
|
-
Then you can run it and visit `chrome://inspect/#devices` in Chrome, and press "Open dedicated DevTools for Node" to get a debugger attached to your process. When debugging the CLI, you'll want to disable workers whenever possible, this will make all code run on the same thread, this is mostly applicable to the `start` command, i.e. `expo-inspect start --max-workers 0`.
|
|
86
|
+
Then you can run it and visit `chrome://inspect/#devices` in Chrome, and press **"Open dedicated DevTools for Node"** to get a debugger attached to your process. When debugging the CLI, you'll want to disable workers whenever possible, this will make all code run on the same thread, this is mostly applicable to the `start` command, i.e. `expo-inspect start --max-workers 0`.
|
|
79
87
|
|
|
80
88
|
## Format
|
|
81
89
|
|
|
@@ -97,7 +105,7 @@ Then you can run it and visit `chrome://inspect/#devices` in Chrome, and press "
|
|
|
97
105
|
- Unlike the legacy global Expo CLI, this CLI is shipped with `expo` meaning the SDK Version is always present.
|
|
98
106
|
- Reduce SDK specific tasks since only one SDK should be accounted for in a single version of `@expo/cli`.
|
|
99
107
|
- The `@expo/config` method `getConfig` does not need the `skipSDKVersionRequirement` in any case since `expo` should always be installed. Ex: `getConfig('...', { skipSDKVersionRequirement: true });` shouldn't be used.
|
|
100
|
-
- Also unlike the global Expo CLI we can assume that node modules are always installed since this CLI should be used via a project's local
|
|
108
|
+
- Also unlike the global Expo CLI we can assume that node modules are always installed since this CLI should be used via a project's local **node_modules** folder.
|
|
101
109
|
- This means we can't perform operations that upgrade the `expo` package as these may kill the running process. Features that need this pattern (like `expo upgrade`) should live in standalone global tools.
|
|
102
110
|
|
|
103
111
|
## Testing
|
|
@@ -105,7 +113,7 @@ Then you can run it and visit `chrome://inspect/#devices` in Chrome, and press "
|
|
|
105
113
|
There are two testing scripts:
|
|
106
114
|
|
|
107
115
|
- `yarn test`: Controlled unit and integration tests.
|
|
108
|
-
- `yarn test:e2e`: End to end testing for CLI commands. This requires the files to be built with `yarn build
|
|
116
|
+
- `yarn test:e2e`: End to end testing for CLI commands. This requires the files to be built with `yarn build`.
|
|
109
117
|
|
|
110
118
|
---
|
|
111
119
|
|
|
@@ -126,7 +134,8 @@ There are two testing scripts:
|
|
|
126
134
|
### E2E Testing Guidelines
|
|
127
135
|
|
|
128
136
|
- E2E tests should be resilient and reliable, be sure to give them plenty of time for network requests.
|
|
129
|
-
- When testing locally you
|
|
137
|
+
- When testing locally you had to have [Bun installed](https://bun.sh/docs/installation).
|
|
138
|
+
- When testing locally you should attempt to reuse node modules for faster results. In the `npx expo prebuild` and `npx expo start` commands for instance, we utilize a helper method that will default to reusing a project + **node_modules** when run locally. This can be [toggled off](https://github.com/expo/expo/blob/11a5a4d27b7e1c8e4d6ddf0401397d789d89f52a/packages/%40expo/cli/e2e/__tests__/utils.ts#L174) to bootstrap a fresh project every time.
|
|
130
139
|
- When bootstrapping test projects, utilize the temporary folder `os.tmpdir()` as this folder is automatically cleaned up when the computer restarts.
|
|
131
140
|
|
|
132
141
|
## Coming from Expo CLI
|
|
@@ -139,6 +148,6 @@ The legacy global `expo-cli` package was deprecated in favor of this versioned `
|
|
|
139
148
|
- `expo-cli` worked for almost all versions of the `expo` package, meaning it was getting more complex with every release.
|
|
140
149
|
- `expo-cli` combined service commands (like the legacy `build`, `submit`, `publish`) with project-level commands like `expo start`. We've since divided services into `eas-cli` and project commands into `npx expo` (`@expo/cli`). This structure is more optimal/faster for developers since they can install/update commands when they need them.
|
|
141
150
|
- This CLI utilizes more Node.js standard features like `$EDITOR` instead of the custom `$EXPO_EDITOR` environment variable. Also transitioning away from `$EXPO_DEBUG` and more towards `$DEBUG=expo:*`. These types of changes make Expo CLI play nicer with existing tooling.
|
|
142
|
-
- The DevTools UI has been deprecated to reduce the net
|
|
151
|
+
- The DevTools UI has been deprecated to reduce the net installation size, minimize complexity, and make room for future debugging UIs (Hermes/v8 Chrome debugger).
|
|
143
152
|
- The `expo start:web` and `expo web` commands have been rolled into `npx expo start` as we now lazily load platforms until the device requests them.
|
|
144
153
|
- Other missing or beta features from `expo-cli` may still be getting migrated over to this new CLI. For a more comprehensive breakdown see the [start command PR](https://github.com/expo/expo/pull/16160).
|
package/build/bin/cli
CHANGED
package/build/src/start/index.js
CHANGED
|
@@ -123,7 +123,7 @@ const expoStart = async (argv)=>{
|
|
|
123
123
|
`--localhost Same as --host localhost`,
|
|
124
124
|
``,
|
|
125
125
|
`--offline Skip network requests and use anonymous manifest signatures`,
|
|
126
|
-
`--https Start the dev server with https protocol`,
|
|
126
|
+
(0, _chalk().default)`--https Start the dev server with https protocol. {bold Deprecated in favor of --tunnel}`,
|
|
127
127
|
`--scheme <scheme> Custom URI protocol to use when launching an app`,
|
|
128
128
|
(0, _chalk().default)`-p, --port <number> Port to start the dev server on (does not apply to web or tunnel). {dim Default: 8081}`,
|
|
129
129
|
``,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/start/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoStart: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--max-workers': Number,\n '--no-dev': Boolean,\n '--minify': Boolean,\n '--https': Boolean,\n '--private-key-path': String,\n '--port': Number,\n '--dev-client': Boolean,\n '--scheme': String,\n '--android': Boolean,\n '--ios': Boolean,\n '--web': Boolean,\n '--host': String,\n '--tunnel': Boolean,\n '--lan': Boolean,\n '--localhost': Boolean,\n '--offline': Boolean,\n '--go': Boolean,\n // Aliases\n '-h': '--help',\n '-c': '--clear',\n '-p': '--port',\n '-a': '--android',\n '-i': '--ios',\n '-w': '--web',\n '-m': '--host',\n '-d': '--dev-client',\n '-g': '--go',\n // Alias for adding interop with the Metro docs and RedBox errors.\n '--reset-cache': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Start a local dev server for the app`,\n chalk`npx expo start {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `-a, --android Open on a connected Android device`,\n `-i, --ios Open in an iOS simulator`,\n `-w, --web Open in a web browser`,\n ``,\n chalk`-d, --dev-client Launch in a custom native app`,\n chalk`-g, --go Launch in Expo Go`,\n ``,\n `-c, --clear Clear the bundler cache`,\n `--max-workers <number> Maximum number of tasks to allow Metro to spawn`,\n `--no-dev Bundle in production mode`,\n `--minify Minify JavaScript`,\n ``,\n chalk`-m, --host <string> Dev server hosting type. {dim Default: lan}`,\n chalk` {bold lan}: Use the local network`,\n chalk` {bold tunnel}: Use any network by tunnel through ngrok`,\n chalk` {bold localhost}: Connect to the dev server over localhost`,\n `--tunnel Same as --host tunnel`,\n `--lan Same as --host lan`,\n `--localhost Same as --host localhost`,\n ``,\n `--offline Skip network requests and use anonymous manifest signatures`,\n `--https Start the dev server with https protocol`,\n `--scheme <scheme> Custom URI protocol to use when launching an app`,\n chalk`-p, --port <number> Port to start the dev server on (does not apply to web or tunnel). {dim Default: 8081}`,\n ``,\n chalk`--private-key-path <path> Path to private key for code signing. {dim Default: \"private-key.pem\" in the same directory as the certificate specified by the expo-updates configuration in app.json.}`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n\n // NOTE(cedric): `./resolveOptions` loads the expo config when using dev clients, this needs to be initialized before that\n const { setNodeEnv, loadEnvFiles } = await import('../utils/nodeEnv.js');\n setNodeEnv(!args['--no-dev'] ? 'development' : 'production');\n loadEnvFiles(projectRoot);\n\n const { resolveOptionsAsync } = await import('./resolveOptions.js');\n const options = await resolveOptionsAsync(projectRoot, args).catch(logCmdError);\n\n if (options.offline) {\n const { disableNetwork } = await import('../api/settings.js');\n disableNetwork();\n }\n\n const { startAsync } = await import('./startAsync.js');\n return startAsync(projectRoot, options, { webOnly: false }).catch(logCmdError);\n};\n"],"names":["expoStart","argv","args","assertArgs","Boolean","Number","String","printHelp","chalk","join","projectRoot","getProjectRoot","setNodeEnv","loadEnvFiles","resolveOptionsAsync","options","catch","logCmdError","offline","disableNetwork","startAsync","webOnly"],"mappings":";;;;;+BAOaA;;;eAAAA;;;;gEANK;;;;;;sBAGoC;wB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CAAC,qDAAqD,CAAC;YACvD,CAAC,kDAAkD,CAAC;YACpD,CAAC,wDAAwD,CAAC;YAC1D,EAAE;YACF,CAAC,2FAA2F,CAAC;
|
|
1
|
+
{"version":3,"sources":["../../../src/start/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport chalk from 'chalk';\n\nimport { Command } from '../../bin/cli';\nimport { assertArgs, getProjectRoot, printHelp } from '../utils/args';\nimport { logCmdError } from '../utils/errors';\n\nexport const expoStart: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--max-workers': Number,\n '--no-dev': Boolean,\n '--minify': Boolean,\n '--https': Boolean,\n '--private-key-path': String,\n '--port': Number,\n '--dev-client': Boolean,\n '--scheme': String,\n '--android': Boolean,\n '--ios': Boolean,\n '--web': Boolean,\n '--host': String,\n '--tunnel': Boolean,\n '--lan': Boolean,\n '--localhost': Boolean,\n '--offline': Boolean,\n '--go': Boolean,\n // Aliases\n '-h': '--help',\n '-c': '--clear',\n '-p': '--port',\n '-a': '--android',\n '-i': '--ios',\n '-w': '--web',\n '-m': '--host',\n '-d': '--dev-client',\n '-g': '--go',\n // Alias for adding interop with the Metro docs and RedBox errors.\n '--reset-cache': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Start a local dev server for the app`,\n chalk`npx expo start {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `-a, --android Open on a connected Android device`,\n `-i, --ios Open in an iOS simulator`,\n `-w, --web Open in a web browser`,\n ``,\n chalk`-d, --dev-client Launch in a custom native app`,\n chalk`-g, --go Launch in Expo Go`,\n ``,\n `-c, --clear Clear the bundler cache`,\n `--max-workers <number> Maximum number of tasks to allow Metro to spawn`,\n `--no-dev Bundle in production mode`,\n `--minify Minify JavaScript`,\n ``,\n chalk`-m, --host <string> Dev server hosting type. {dim Default: lan}`,\n chalk` {bold lan}: Use the local network`,\n chalk` {bold tunnel}: Use any network by tunnel through ngrok`,\n chalk` {bold localhost}: Connect to the dev server over localhost`,\n `--tunnel Same as --host tunnel`,\n `--lan Same as --host lan`,\n `--localhost Same as --host localhost`,\n ``,\n `--offline Skip network requests and use anonymous manifest signatures`,\n chalk`--https Start the dev server with https protocol. {bold Deprecated in favor of --tunnel}`,\n `--scheme <scheme> Custom URI protocol to use when launching an app`,\n chalk`-p, --port <number> Port to start the dev server on (does not apply to web or tunnel). {dim Default: 8081}`,\n ``,\n chalk`--private-key-path <path> Path to private key for code signing. {dim Default: \"private-key.pem\" in the same directory as the certificate specified by the expo-updates configuration in app.json.}`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n\n // NOTE(cedric): `./resolveOptions` loads the expo config when using dev clients, this needs to be initialized before that\n const { setNodeEnv, loadEnvFiles } = await import('../utils/nodeEnv.js');\n setNodeEnv(!args['--no-dev'] ? 'development' : 'production');\n loadEnvFiles(projectRoot);\n\n const { resolveOptionsAsync } = await import('./resolveOptions.js');\n const options = await resolveOptionsAsync(projectRoot, args).catch(logCmdError);\n\n if (options.offline) {\n const { disableNetwork } = await import('../api/settings.js');\n disableNetwork();\n }\n\n const { startAsync } = await import('./startAsync.js');\n return startAsync(projectRoot, options, { webOnly: false }).catch(logCmdError);\n};\n"],"names":["expoStart","argv","args","assertArgs","Boolean","Number","String","printHelp","chalk","join","projectRoot","getProjectRoot","setNodeEnv","loadEnvFiles","resolveOptionsAsync","options","catch","logCmdError","offline","disableNetwork","startAsync","webOnly"],"mappings":";;;;;+BAOaA;;;eAAAA;;;;gEANK;;;;;;sBAGoC;wBAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErB,MAAMA,YAAqB,OAAOC;IACvC,MAAMC,OAAOC,IAAAA,gBAAU,EACrB;QACE,QAAQ;QACR,UAAUC;QACV,WAAWA;QACX,iBAAiBC;QACjB,YAAYD;QACZ,YAAYA;QACZ,WAAWA;QACX,sBAAs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AAC;YAC7H,EAAE;YACFA,IAAAA,gBAAK,CAAA,CAAC,wMAAwM,CAAC;YAC/M,CAAC,0CAA0C,CAAC;SAC7C,CAACC,IAAI,CAAC;IAEX;IAEA,MAAMC,cAAcC,IAAAA,oBAAc,EAACT;IAEnC,0HAA0H;IAC1H,MAAM,EAAEU,UAAU,EAAEC,YAAY,EAAE,GAAG,MAAM,mEAAA,QAAO;IAClDD,WAAW,CAACV,IAAI,CAAC,WAAW,GAAG,gBAAgB;IAC/CW,aAAaH;IAEb,MAAM,EAAEI,mBAAmB,EAAE,GAAG,MAAM,mEAAA,QAAO;IAC7C,MAAMC,UAAU,MAAMD,oBAAoBJ,aAAaR,MAAMc,KAAK,CAACC,mBAAW;IAE9E,IAAIF,QAAQG,OAAO,EAAE;QACnB,MAAM,EAAEC,cAAc,EAAE,GAAG,MAAM,mEAAA,QAAO;QACxCA;IACF;IAEA,MAAM,EAAEC,UAAU,EAAE,GAAG,MAAM,mEAAA,QAAO;IACpC,OAAOA,WAAWV,aAAaK,SAAS;QAAEM,SAAS;IAAM,GAAGL,KAAK,CAACC,mBAAW;AAC/E"}
|
|
@@ -57,6 +57,9 @@ async function resolveOptionsAsync(projectRoot, args) {
|
|
|
57
57
|
localhost: args['--localhost'],
|
|
58
58
|
tunnel: args['--tunnel']
|
|
59
59
|
});
|
|
60
|
+
if (args['--https']) {
|
|
61
|
+
_log.Log.warn((0, _chalk().default)`{bold --https} option is deprecated in favor of {bold --tunnel}`);
|
|
62
|
+
}
|
|
60
63
|
// User can force the default target by passing either `--dev-client` or `--go`. They can also
|
|
61
64
|
// swap between them during development by pressing `s`.
|
|
62
65
|
const isUserDefinedDevClient = !!args['--dev-client'] || (args['--go'] == null ? false : !args['--go']);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/start/resolveOptions.ts"],"sourcesContent":["import assert from 'assert';\nimport chalk from 'chalk';\n\nimport { canResolveDevClient, hasDirectDevClientDependency } from './detectDevClient';\nimport { Log } from '../log';\nimport { envIsWebcontainer } from '../utils/env';\nimport { AbortCommandError, CommandError } from '../utils/errors';\nimport { resolvePortAsync } from '../utils/port';\n\nexport type Options = {\n privateKeyPath: string | null;\n android: boolean;\n web: boolean;\n ios: boolean;\n offline: boolean;\n clear: boolean;\n dev: boolean;\n https: boolean;\n maxWorkers: number;\n port: number;\n /** Should instruct the bundler to create minified bundles. */\n minify: boolean;\n devClient: boolean;\n scheme: string | null;\n host: 'localhost' | 'lan' | 'tunnel';\n};\n\nexport async function resolveOptionsAsync(projectRoot: string, args: any): Promise<Options> {\n if (args['--dev-client'] && args['--go']) {\n throw new CommandError('BAD_ARGS', 'Cannot use both --dev-client and --go together.');\n }\n const host = resolveHostType({\n host: args['--host'],\n offline: args['--offline'],\n lan: args['--lan'],\n localhost: args['--localhost'],\n tunnel: args['--tunnel'],\n });\n\n // User can force the default target by passing either `--dev-client` or `--go`. They can also\n // swap between them during development by pressing `s`.\n const isUserDefinedDevClient =\n !!args['--dev-client'] || (args['--go'] == null ? false : !args['--go']);\n\n // If the user didn't specify `--dev-client` or `--go` we check if they have the dev client package\n // in their package.json.\n const isAutoDevClient =\n args['--dev-client'] == null &&\n args['--go'] == null &&\n hasDirectDevClientDependency(projectRoot);\n\n const isDevClient = isAutoDevClient || isUserDefinedDevClient;\n\n const scheme = await resolveSchemeAsync(projectRoot, {\n scheme: args['--scheme'],\n devClient: isDevClient,\n });\n\n return {\n privateKeyPath: args['--private-key-path'] ?? null,\n\n android: !!args['--android'],\n web: !!args['--web'],\n ios: !!args['--ios'],\n offline: !!args['--offline'],\n\n clear: !!args['--clear'],\n dev: !args['--no-dev'],\n https: !!args['--https'],\n maxWorkers: args['--max-workers'],\n port: args['--port'],\n minify: !!args['--minify'],\n\n devClient: isDevClient,\n\n scheme,\n host,\n };\n}\n\nexport async function resolveSchemeAsync(\n projectRoot: string,\n options: { scheme?: string; devClient?: boolean }\n): Promise<string | null> {\n if (typeof options.scheme === 'string') {\n // Use the custom scheme\n return options.scheme ?? null;\n }\n\n if (options.devClient || canResolveDevClient(projectRoot)) {\n const { getOptionalDevClientSchemeAsync } =\n require('../utils/scheme') as typeof import('../utils/scheme');\n // Attempt to find the scheme or warn the user how to setup a custom scheme\n const resolvedScheme = await getOptionalDevClientSchemeAsync(projectRoot);\n if (!resolvedScheme.scheme) {\n if (resolvedScheme.resolution === 'shared') {\n // This can happen if one of the native projects has no URI schemes defined in it.\n // Normally, this should never happen.\n Log.warn(\n chalk`Could not find a shared URI scheme for the dev client between the local {bold /ios} and {bold /android} directories. App launches (QR code, interstitial, terminal keys) may not work as expected. You can configure a custom scheme using the {bold --scheme} option, or by running {bold npx expo prebuild} to regenerate the native directories with URI schemes.`\n );\n } else if (['ios', 'android'].includes(resolvedScheme.resolution)) {\n Log.warn(\n chalk`The {bold /${resolvedScheme.resolution}} project does not contain any URI schemes. Expo CLI will not be able to use links to launch the project. You can configure a custom URI scheme using the {bold --scheme} option.`\n );\n }\n }\n return resolvedScheme.scheme;\n } else {\n // Ensure this is reset when users don't use `--scheme`, `--dev-client` and don't have the `expo-dev-client` package installed.\n return null;\n }\n}\n\n/** Resolve and assert host type options. */\nexport function resolveHostType(options: {\n host?: string;\n offline?: boolean;\n lan?: boolean;\n localhost?: boolean;\n tunnel?: boolean;\n}): 'lan' | 'tunnel' | 'localhost' {\n if (\n [options.offline, options.host, options.lan, options.localhost, options.tunnel].filter((i) => i)\n .length > 1\n ) {\n throw new CommandError(\n 'BAD_ARGS',\n 'Specify at most one of: --offline, --host, --tunnel, --lan, --localhost'\n );\n }\n\n if (options.offline) {\n // Force `lan` in offline mode.\n return 'lan';\n } else if (options.host) {\n assert.match(options.host, /^(lan|tunnel|localhost)$/);\n return options.host as 'lan' | 'tunnel' | 'localhost';\n } else if (options.tunnel) {\n return 'tunnel';\n } else if (options.lan) {\n return 'lan';\n } else if (options.localhost) {\n return 'localhost';\n }\n\n // If no option is provided, and we are running in Stackblitz, enable tunnel by default\n if (envIsWebcontainer()) {\n return 'tunnel';\n }\n\n return 'lan';\n}\n\n/** Resolve the port options for all supported bundlers. */\nexport async function resolvePortsAsync(\n projectRoot: string,\n options: Partial<Pick<Options, 'port' | 'devClient'>>,\n settings: { webOnly?: boolean }\n) {\n const multiBundlerSettings: { webpackPort?: number; metroPort?: number } = {};\n\n if (settings.webOnly) {\n const webpackPort = await resolvePortAsync(projectRoot, {\n defaultPort: options.port,\n // Default web port\n fallbackPort: 19006,\n });\n if (!webpackPort) {\n throw new AbortCommandError();\n }\n multiBundlerSettings.webpackPort = webpackPort;\n } else {\n const fallbackPort = process.env.RCT_METRO_PORT\n ? parseInt(process.env.RCT_METRO_PORT, 10)\n : 8081;\n const metroPort = await resolvePortAsync(projectRoot, {\n defaultPort: options.port,\n fallbackPort,\n });\n if (!metroPort) {\n throw new AbortCommandError();\n }\n multiBundlerSettings.metroPort = metroPort;\n }\n\n return multiBundlerSettings;\n}\n"],"names":["resolveHostType","resolveOptionsAsync","resolvePortsAsync","resolveSchemeAsync","projectRoot","args","CommandError","host","offline","lan","localhost","tunnel","isUserDefinedDevClient","isAutoDevClient","hasDirectDevClientDependency","isDevClient","scheme","devClient","privateKeyPath","android","web","ios","clear","dev","https","maxWorkers","port","minify","options","canResolveDevClient","getOptionalDevClientSchemeAsync","require","resolvedScheme","resolution","Log","warn","chalk","includes","filter","i","length","assert","match","envIsWebcontainer","settings","multiBundlerSettings","webOnly","webpackPort","resolvePortAsync","defaultPort","fallbackPort","AbortCommandError","process","env","RCT_METRO_PORT","parseInt","metroPort"],"mappings":";;;;;;;;;;;IAmHgBA,eAAe;eAAfA;;IAxFMC,mBAAmB;eAAnBA;;IAgIAC,iBAAiB;eAAjBA;;IA3EAC,kBAAkB;eAAlBA;;;;gEAhFH;;;;;;;gEACD;;;;;;iCAEgD;qBAC9C;qBACc;wBACc;sBACf;;;;;;AAoB1B,eAAeF,oBAAoBG,WAAmB,EAAEC,IAAS;IACtE,IAAIA,IAAI,CAAC,eAAe,IAAIA,IAAI,CA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MAAM,EAAE;QACzB,OAAO;IACT,OAAO,IAAIiB,QAAQnB,GAAG,EAAE;QACtB,OAAO;IACT,OAAO,IAAImB,QAAQlB,SAAS,EAAE;QAC5B,OAAO;IACT;IAEA,uFAAuF;IACvF,IAAIiC,IAAAA,sBAAiB,KAAI;QACvB,OAAO;IACT;IAEA,OAAO;AACT;AAGO,eAAezC,kBACpBE,WAAmB,EACnBwB,OAAqD,EACrDgB,QAA+B;IAE/B,MAAMC,uBAAqE,CAAC;IAE5E,IAAID,SAASE,OAAO,EAAE;QACpB,MAAMC,cAAc,MAAMC,IAAAA,sBAAgB,EAAC5C,aAAa;YACtD6C,aAAarB,QAAQF,IAAI;YACzB,mBAAmB;YACnBwB,cAAc;QAChB;QACA,IAAI,CAACH,aAAa;YAChB,MAAM,IAAII,yBAAiB;QAC7B;QACAN,qBAAqBE,WAAW,GAAGA;IACrC,OAAO;QACL,MAAMG,eAAeE,QAAQC,GAAG,CAACC,cAAc,GAC3CC,SAASH,QAAQC,GAAG,CAACC,cAAc,EAAE,MACrC;QACJ,MAAME,YAAY,MAAMR,IAAAA,sBAAgB,EAAC5C,aAAa;YACpD6C,aAAarB,QAAQF,IAAI;YACzBwB;QACF;QACA,IAAI,CAACM,WAAW;YACd,MAAM,IAAIL,yBAAiB;QAC7B;QACAN,qBAAqBW,SAAS,GAAGA;IACnC;IAEA,OAAOX;AACT"}
|
|
1
|
+
{"version":3,"sources":["../../../src/start/resolveOptions.ts"],"sourcesContent":["import assert from 'assert';\nimport chalk from 'chalk';\n\nimport { canResolveDevClient, hasDirectDevClientDependency } from './detectDevClient';\nimport { Log } from '../log';\nimport { envIsWebcontainer } from '../utils/env';\nimport { AbortCommandError, CommandError } from '../utils/errors';\nimport { resolvePortAsync } from '../utils/port';\n\nexport type Options = {\n privateKeyPath: string | null;\n android: boolean;\n web: boolean;\n ios: boolean;\n offline: boolean;\n clear: boolean;\n dev: boolean;\n https: boolean;\n maxWorkers: number;\n port: number;\n /** Should instruct the bundler to create minified bundles. */\n minify: boolean;\n devClient: boolean;\n scheme: string | null;\n host: 'localhost' | 'lan' | 'tunnel';\n};\n\nexport async function resolveOptionsAsync(projectRoot: string, args: any): Promise<Options> {\n if (args['--dev-client'] && args['--go']) {\n throw new CommandError('BAD_ARGS', 'Cannot use both --dev-client and --go together.');\n }\n const host = resolveHostType({\n host: args['--host'],\n offline: args['--offline'],\n lan: args['--lan'],\n localhost: args['--localhost'],\n tunnel: args['--tunnel'],\n });\n\n if (args['--https']) {\n Log.warn(chalk`{bold --https} option is deprecated in favor of {bold --tunnel}`);\n }\n\n // User can force the default target by passing either `--dev-client` or `--go`. They can also\n // swap between them during development by pressing `s`.\n const isUserDefinedDevClient =\n !!args['--dev-client'] || (args['--go'] == null ? false : !args['--go']);\n\n // If the user didn't specify `--dev-client` or `--go` we check if they have the dev client package\n // in their package.json.\n const isAutoDevClient =\n args['--dev-client'] == null &&\n args['--go'] == null &&\n hasDirectDevClientDependency(projectRoot);\n\n const isDevClient = isAutoDevClient || isUserDefinedDevClient;\n\n const scheme = await resolveSchemeAsync(projectRoot, {\n scheme: args['--scheme'],\n devClient: isDevClient,\n });\n\n return {\n privateKeyPath: args['--private-key-path'] ?? null,\n\n android: !!args['--android'],\n web: !!args['--web'],\n ios: !!args['--ios'],\n offline: !!args['--offline'],\n\n clear: !!args['--clear'],\n dev: !args['--no-dev'],\n https: !!args['--https'],\n maxWorkers: args['--max-workers'],\n port: args['--port'],\n minify: !!args['--minify'],\n\n devClient: isDevClient,\n\n scheme,\n host,\n };\n}\n\nexport async function resolveSchemeAsync(\n projectRoot: string,\n options: { scheme?: string; devClient?: boolean }\n): Promise<string | null> {\n if (typeof options.scheme === 'string') {\n // Use the custom scheme\n return options.scheme ?? null;\n }\n\n if (options.devClient || canResolveDevClient(projectRoot)) {\n const { getOptionalDevClientSchemeAsync } =\n require('../utils/scheme') as typeof import('../utils/scheme');\n // Attempt to find the scheme or warn the user how to setup a custom scheme\n const resolvedScheme = await getOptionalDevClientSchemeAsync(projectRoot);\n if (!resolvedScheme.scheme) {\n if (resolvedScheme.resolution === 'shared') {\n // This can happen if one of the native projects has no URI schemes defined in it.\n // Normally, this should never happen.\n Log.warn(\n chalk`Could not find a shared URI scheme for the dev client between the local {bold /ios} and {bold /android} directories. App launches (QR code, interstitial, terminal keys) may not work as expected. You can configure a custom scheme using the {bold --scheme} option, or by running {bold npx expo prebuild} to regenerate the native directories with URI schemes.`\n );\n } else if (['ios', 'android'].includes(resolvedScheme.resolution)) {\n Log.warn(\n chalk`The {bold /${resolvedScheme.resolution}} project does not contain any URI schemes. Expo CLI will not be able to use links to launch the project. You can configure a custom URI scheme using the {bold --scheme} option.`\n );\n }\n }\n return resolvedScheme.scheme;\n } else {\n // Ensure this is reset when users don't use `--scheme`, `--dev-client` and don't have the `expo-dev-client` package installed.\n return null;\n }\n}\n\n/** Resolve and assert host type options. */\nexport function resolveHostType(options: {\n host?: string;\n offline?: boolean;\n lan?: boolean;\n localhost?: boolean;\n tunnel?: boolean;\n}): 'lan' | 'tunnel' | 'localhost' {\n if (\n [options.offline, options.host, options.lan, options.localhost, options.tunnel].filter((i) => i)\n .length > 1\n ) {\n throw new CommandError(\n 'BAD_ARGS',\n 'Specify at most one of: --offline, --host, --tunnel, --lan, --localhost'\n );\n }\n\n if (options.offline) {\n // Force `lan` in offline mode.\n return 'lan';\n } else if (options.host) {\n assert.match(options.host, /^(lan|tunnel|localhost)$/);\n return options.host as 'lan' | 'tunnel' | 'localhost';\n } else if (options.tunnel) {\n return 'tunnel';\n } else if (options.lan) {\n return 'lan';\n } else if (options.localhost) {\n return 'localhost';\n }\n\n // If no option is provided, and we are running in Stackblitz, enable tunnel by default\n if (envIsWebcontainer()) {\n return 'tunnel';\n }\n\n return 'lan';\n}\n\n/** Resolve the port options for all supported bundlers. */\nexport async function resolvePortsAsync(\n projectRoot: string,\n options: Partial<Pick<Options, 'port' | 'devClient'>>,\n settings: { webOnly?: boolean }\n) {\n const multiBundlerSettings: { webpackPort?: number; metroPort?: number } = {};\n\n if (settings.webOnly) {\n const webpackPort = await resolvePortAsync(projectRoot, {\n defaultPort: options.port,\n // Default web port\n fallbackPort: 19006,\n });\n if (!webpackPort) {\n throw new AbortCommandError();\n }\n multiBundlerSettings.webpackPort = webpackPort;\n } else {\n const fallbackPort = process.env.RCT_METRO_PORT\n ? parseInt(process.env.RCT_METRO_PORT, 10)\n : 8081;\n const metroPort = await resolvePortAsync(projectRoot, {\n defaultPort: options.port,\n fallbackPort,\n });\n if (!metroPort) {\n throw new AbortCommandError();\n }\n multiBundlerSettings.metroPort = metroPort;\n }\n\n return multiBundlerSettings;\n}\n"],"names":["resolveHostType","resolveOptionsAsync","resolvePortsAsync","resolveSchemeAsync","projectRoot","args","CommandError","host","offline","lan","localhost","tunnel","Log","warn","chalk","isUserDefinedDevClient","isAutoDevClient","hasDirectDevClientDependency","isDevClient","scheme","devClient","privateKeyPath","android","web","ios","clear","dev","https","maxWorkers","port","minify","options","canResolveDevClient","getOptionalDevClientSchemeAsync","require","resolvedScheme","resolution","includes","filter","i","length","assert","match","envIsWebcontainer","settings","multiBundlerSettings","webOnly","webpackPort","resolvePortAsync","defaultPort","fallbackPort","AbortCommandError","process","env","RCT_METRO_PORT","parseInt","metroPort"],"mappings":";;;;;;;;;;;IAuHgBA,eAAe;eAAfA;;IA5FMC,mBAAmB;eAAnBA;;IAoIAC,iBAAiB;eAAjBA;;IA3EAC,kBAAkB;eAAlBA;;;;gEApFH;;;;;;;gEACD;;;;;;iCAEgD;qBAC9C;qBACc;wBACc;sBACf;;;;;;AAoB1B,eAAeF,oBAAoBG,WAAmB,EAAEC,IAAS;IACtE,IAAIA,IAAI,CAAC,eAAe,IAAIA,IAAI,CAAC,OAAO,EAAE;QACxC,MAAM,IAAIC,oBAAY,CAAC,YAAY;IACrC;IACA,MAAMC,OAAOP,gBAAgB;QAC3BO,MAAMF,IAAI,CAAC,SAAS;QACpBG,SAASH,IAAI,CAAC,YAAY;QAC1BI,KAAKJ,I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QtB,GAAG,EAAE;QACtB,OAAO;IACT,OAAO,IAAIsB,QAAQrB,SAAS,EAAE;QAC5B,OAAO;IACT;IAEA,uFAAuF;IACvF,IAAIiC,IAAAA,sBAAiB,KAAI;QACvB,OAAO;IACT;IAEA,OAAO;AACT;AAGO,eAAezC,kBACpBE,WAAmB,EACnB2B,OAAqD,EACrDa,QAA+B;IAE/B,MAAMC,uBAAqE,CAAC;IAE5E,IAAID,SAASE,OAAO,EAAE;QACpB,MAAMC,cAAc,MAAMC,IAAAA,sBAAgB,EAAC5C,aAAa;YACtD6C,aAAalB,QAAQF,IAAI;YACzB,mBAAmB;YACnBqB,cAAc;QAChB;QACA,IAAI,CAACH,aAAa;YAChB,MAAM,IAAII,yBAAiB;QAC7B;QACAN,qBAAqBE,WAAW,GAAGA;IACrC,OAAO;QACL,MAAMG,eAAeE,QAAQC,GAAG,CAACC,cAAc,GAC3CC,SAASH,QAAQC,GAAG,CAACC,cAAc,EAAE,MACrC;QACJ,MAAME,YAAY,MAAMR,IAAAA,sBAAgB,EAAC5C,aAAa;YACpD6C,aAAalB,QAAQF,IAAI;YACzBqB;QACF;QACA,IAAI,CAACM,WAAW;YACd,MAAM,IAAIL,yBAAiB;QAC7B;QACAN,qBAAqBW,SAAS,GAAGA;IACnC;IAEA,OAAOX;AACT"}
|
|
@@ -33,7 +33,7 @@ class FetchClient {
|
|
|
33
33
|
this.headers = {
|
|
34
34
|
accept: 'application/json',
|
|
35
35
|
'content-type': 'application/json',
|
|
36
|
-
'user-agent': `expo-cli/${"0.23.
|
|
36
|
+
'user-agent': `expo-cli/${"0.23.4"}`,
|
|
37
37
|
authorization: 'Basic ' + _nodebuffer().Buffer.from(`${target}:`).toString('base64')
|
|
38
38
|
};
|
|
39
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/cli",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.4",
|
|
4
4
|
"description": "The Expo CLI",
|
|
5
5
|
"main": "build/bin/cli",
|
|
6
6
|
"bin": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@expo/osascript": "^2.2.1",
|
|
53
53
|
"@expo/package-manager": "^1.8.1",
|
|
54
54
|
"@expo/plist": "^0.3.1",
|
|
55
|
-
"@expo/prebuild-config": "^8.1.
|
|
55
|
+
"@expo/prebuild-config": "^8.1.3",
|
|
56
56
|
"@expo/spawn-async": "^1.7.2",
|
|
57
57
|
"@expo/ws-tunnel": "^1.0.1",
|
|
58
58
|
"@expo/xcpretty": "^4.3.0",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"devDependencies": {
|
|
110
110
|
"@expo/multipart-body-parser": "^1.0.0",
|
|
111
111
|
"@expo/ngrok": "4.1.3",
|
|
112
|
-
"@expo/server": "^0.6.
|
|
112
|
+
"@expo/server": "^0.6.2",
|
|
113
113
|
"@graphql-codegen/cli": "^2.16.3",
|
|
114
114
|
"@graphql-codegen/typescript": "^2.8.7",
|
|
115
115
|
"@graphql-codegen/typescript-operations": "^2.5.12",
|
|
@@ -152,5 +152,5 @@
|
|
|
152
152
|
"tree-kill": "^1.2.2",
|
|
153
153
|
"tsd": "^0.28.1"
|
|
154
154
|
},
|
|
155
|
-
"gitHead": "
|
|
155
|
+
"gitHead": "c81263062bf24ad09e51e019f1d7dc29fa651c55"
|
|
156
156
|
}
|