@expo/cli 56.1.16 → 57.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bin/cli +1 -1
- package/build/src/events/index.js +1 -1
- package/build/src/export/exportApp.js +30 -26
- package/build/src/export/exportApp.js.map +1 -1
- package/build/src/export/exportStaticAsync.js +19 -11
- package/build/src/export/exportStaticAsync.js.map +1 -1
- package/build/src/export/favicon.js +23 -31
- package/build/src/export/favicon.js.map +1 -1
- package/build/src/prebuild/clearNativeFolder.js +5 -8
- package/build/src/prebuild/clearNativeFolder.js.map +1 -1
- package/build/src/prebuild/index.js +3 -2
- package/build/src/prebuild/index.js.map +1 -1
- package/build/src/prebuild/prebuildAsync.js +15 -10
- package/build/src/prebuild/prebuildAsync.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +8 -2
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/webTemplate.js +6 -2
- package/build/src/start/server/webTemplate.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 +24 -24
|
@@ -45,7 +45,7 @@ function _interop_require_default(obj) {
|
|
|
45
45
|
default: obj
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
async function createTemplateHtmlFromExpoConfigAsync(projectRoot, { scripts, cssLinks, exp = (0, _config().getConfig)(projectRoot, {
|
|
48
|
+
async function createTemplateHtmlFromExpoConfigAsync(projectRoot, { scripts, cssLinks, extraHead, exp = (0, _config().getConfig)(projectRoot, {
|
|
49
49
|
skipSDKVersionRequirement: true
|
|
50
50
|
}).exp }) {
|
|
51
51
|
var _exp_web, _exp_web1, _exp_web2;
|
|
@@ -53,6 +53,7 @@ async function createTemplateHtmlFromExpoConfigAsync(projectRoot, { scripts, css
|
|
|
53
53
|
langIsoCode: ((_exp_web = exp.web) == null ? void 0 : _exp_web.lang) ?? 'en',
|
|
54
54
|
scripts,
|
|
55
55
|
cssLinks,
|
|
56
|
+
extraHead,
|
|
56
57
|
title: (0, _config().getNameFromConfig)(exp).webName ?? 'Expo App',
|
|
57
58
|
description: (_exp_web1 = exp.web) == null ? void 0 : _exp_web1.description,
|
|
58
59
|
themeColor: (_exp_web2 = exp.web) == null ? void 0 : _exp_web2.themeColor
|
|
@@ -74,7 +75,7 @@ function getFileFromLocalPublicFolder(projectRoot, { filePath }) {
|
|
|
74
75
|
}
|
|
75
76
|
return _fs().default.promises.readFile(filePath, 'utf8');
|
|
76
77
|
}
|
|
77
|
-
async function createTemplateHtmlAsync(projectRoot, { scripts, cssLinks, description, langIsoCode, title, themeColor }) {
|
|
78
|
+
async function createTemplateHtmlAsync(projectRoot, { scripts, cssLinks, extraHead, description, langIsoCode, title, themeColor }) {
|
|
78
79
|
// Resolve the best possible index.html template file.
|
|
79
80
|
let contents = await getTemplateIndexHtmlAsync(projectRoot);
|
|
80
81
|
contents = contents.replace('%LANG_ISO_CODE%', langIsoCode);
|
|
@@ -100,6 +101,9 @@ async function createTemplateHtmlAsync(projectRoot, { scripts, cssLinks, descrip
|
|
|
100
101
|
if (description) {
|
|
101
102
|
contents = addMeta(contents, `name="description" content="${description}"`);
|
|
102
103
|
}
|
|
104
|
+
if (extraHead) {
|
|
105
|
+
contents = contents.replace('</head>', `${extraHead}</head>`);
|
|
106
|
+
}
|
|
103
107
|
return contents;
|
|
104
108
|
}
|
|
105
109
|
/** Add a `<meta />` tag to the `<head />` element. */ function addMeta(contents, meta) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/start/server/webTemplate.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config';\nimport { getConfig, getNameFromConfig } from '@expo/config';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { TEMPLATES } from '../../customize/templates';\nimport { appendLinkToHtml, appendScriptsToHtml } from '../../export/html';\nimport { getPublicFolderPath } from '../../export/publicFolder';\n\n/**\n * Create a static HTML for SPA styled websites.\n * This method attempts to reuse the same patterns as `@expo/webpack-config`.\n */\nexport async function createTemplateHtmlFromExpoConfigAsync(\n projectRoot: string,\n {\n scripts,\n cssLinks,\n exp = getConfig(projectRoot, { skipSDKVersionRequirement: true }).exp,\n }: {\n scripts: string[];\n cssLinks?: string[];\n exp?: ExpoConfig;\n }\n) {\n return createTemplateHtmlAsync(projectRoot, {\n langIsoCode: exp.web?.lang ?? 'en',\n scripts,\n cssLinks,\n title: getNameFromConfig(exp).webName ?? 'Expo App',\n description: exp.web?.description,\n themeColor: exp.web?.themeColor,\n });\n}\n\nfunction getFileFromLocalPublicFolder(\n projectRoot: string,\n { filePath }: { filePath: string }\n): string | null {\n const localFilePath = path.resolve(getPublicFolderPath(projectRoot), filePath);\n if (!fs.existsSync(localFilePath)) {\n return null;\n }\n return localFilePath;\n}\n\n/** Attempt to read the `index.html` from the local project before falling back on the template `index.html`. */\nasync function getTemplateIndexHtmlAsync(projectRoot: string): Promise<string> {\n let filePath = getFileFromLocalPublicFolder(projectRoot, {\n filePath: 'index.html',\n });\n if (!filePath) {\n filePath = TEMPLATES.find((value) => value.id === 'index.html')!.file(projectRoot);\n }\n return fs.promises.readFile(filePath, 'utf8');\n}\n\n/** Return an `index.html` string with template values added. */\nexport async function createTemplateHtmlAsync(\n projectRoot: string,\n {\n scripts,\n cssLinks,\n description,\n langIsoCode,\n title,\n themeColor,\n }: {\n scripts: string[];\n cssLinks?: string[];\n description?: string;\n langIsoCode: string;\n title: string;\n themeColor?: string;\n }\n): Promise<string> {\n // Resolve the best possible index.html template file.\n let contents = await getTemplateIndexHtmlAsync(projectRoot);\n\n contents = contents.replace('%LANG_ISO_CODE%', langIsoCode);\n contents = contents.replace('%WEB_TITLE%', title);\n\n contents = appendScriptsToHtml(contents, scripts);\n\n if (cssLinks) {\n contents = appendLinkToHtml(\n contents,\n cssLinks\n .map((href) => [\n // NOTE: We probably don't have to preload the CSS files for SPA-styled websites.\n {\n as: 'style',\n rel: 'preload',\n href,\n },\n {\n rel: 'stylesheet',\n href,\n },\n ])\n .flat()\n );\n }\n\n if (themeColor) {\n contents = addMeta(contents, `name=\"theme-color\" content=\"${themeColor}\"`);\n }\n\n if (description) {\n contents = addMeta(contents, `name=\"description\" content=\"${description}\"`);\n }\n\n return contents;\n}\n\n/** Add a `<meta />` tag to the `<head />` element. */\nfunction addMeta(contents: string, meta: string): string {\n return contents.replace('</head>', `<meta ${meta}>\\n</head>`);\n}\n"],"names":["createTemplateHtmlAsync","createTemplateHtmlFromExpoConfigAsync","projectRoot","scripts","cssLinks","exp","getConfig","skipSDKVersionRequirement","langIsoCode","web","lang","title","getNameFromConfig","webName","description","themeColor","getFileFromLocalPublicFolder","filePath","localFilePath","path","resolve","getPublicFolderPath","fs","existsSync","getTemplateIndexHtmlAsync","TEMPLATES","find","value","id","file","promises","readFile","contents","replace","appendScriptsToHtml","appendLinkToHtml","map","href","as","rel","flat","addMeta","meta"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../../src/start/server/webTemplate.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config';\nimport { getConfig, getNameFromConfig } from '@expo/config';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { TEMPLATES } from '../../customize/templates';\nimport { appendLinkToHtml, appendScriptsToHtml } from '../../export/html';\nimport { getPublicFolderPath } from '../../export/publicFolder';\n\n/**\n * Create a static HTML for SPA styled websites.\n * This method attempts to reuse the same patterns as `@expo/webpack-config`.\n */\nexport async function createTemplateHtmlFromExpoConfigAsync(\n projectRoot: string,\n {\n scripts,\n cssLinks,\n extraHead,\n exp = getConfig(projectRoot, { skipSDKVersionRequirement: true }).exp,\n }: {\n scripts: string[];\n cssLinks?: string[];\n /** Pre-rendered HTML to inject before `</head>`. Used for caller-owned head assets like favicons. */\n extraHead?: string;\n exp?: ExpoConfig;\n }\n) {\n return createTemplateHtmlAsync(projectRoot, {\n langIsoCode: exp.web?.lang ?? 'en',\n scripts,\n cssLinks,\n extraHead,\n title: getNameFromConfig(exp).webName ?? 'Expo App',\n description: exp.web?.description,\n themeColor: exp.web?.themeColor,\n });\n}\n\nfunction getFileFromLocalPublicFolder(\n projectRoot: string,\n { filePath }: { filePath: string }\n): string | null {\n const localFilePath = path.resolve(getPublicFolderPath(projectRoot), filePath);\n if (!fs.existsSync(localFilePath)) {\n return null;\n }\n return localFilePath;\n}\n\n/** Attempt to read the `index.html` from the local project before falling back on the template `index.html`. */\nasync function getTemplateIndexHtmlAsync(projectRoot: string): Promise<string> {\n let filePath = getFileFromLocalPublicFolder(projectRoot, {\n filePath: 'index.html',\n });\n if (!filePath) {\n filePath = TEMPLATES.find((value) => value.id === 'index.html')!.file(projectRoot);\n }\n return fs.promises.readFile(filePath, 'utf8');\n}\n\n/** Return an `index.html` string with template values added. */\nexport async function createTemplateHtmlAsync(\n projectRoot: string,\n {\n scripts,\n cssLinks,\n extraHead,\n description,\n langIsoCode,\n title,\n themeColor,\n }: {\n scripts: string[];\n cssLinks?: string[];\n /** Pre-rendered HTML to inject before `</head>`. */\n extraHead?: string;\n description?: string;\n langIsoCode: string;\n title: string;\n themeColor?: string;\n }\n): Promise<string> {\n // Resolve the best possible index.html template file.\n let contents = await getTemplateIndexHtmlAsync(projectRoot);\n\n contents = contents.replace('%LANG_ISO_CODE%', langIsoCode);\n contents = contents.replace('%WEB_TITLE%', title);\n\n contents = appendScriptsToHtml(contents, scripts);\n\n if (cssLinks) {\n contents = appendLinkToHtml(\n contents,\n cssLinks\n .map((href) => [\n // NOTE: We probably don't have to preload the CSS files for SPA-styled websites.\n {\n as: 'style',\n rel: 'preload',\n href,\n },\n {\n rel: 'stylesheet',\n href,\n },\n ])\n .flat()\n );\n }\n\n if (themeColor) {\n contents = addMeta(contents, `name=\"theme-color\" content=\"${themeColor}\"`);\n }\n\n if (description) {\n contents = addMeta(contents, `name=\"description\" content=\"${description}\"`);\n }\n\n if (extraHead) {\n contents = contents.replace('</head>', `${extraHead}</head>`);\n }\n\n return contents;\n}\n\n/** Add a `<meta />` tag to the `<head />` element. */\nfunction addMeta(contents: string, meta: string): string {\n return contents.replace('</head>', `<meta ${meta}>\\n</head>`);\n}\n"],"names":["createTemplateHtmlAsync","createTemplateHtmlFromExpoConfigAsync","projectRoot","scripts","cssLinks","extraHead","exp","getConfig","skipSDKVersionRequirement","langIsoCode","web","lang","title","getNameFromConfig","webName","description","themeColor","getFileFromLocalPublicFolder","filePath","localFilePath","path","resolve","getPublicFolderPath","fs","existsSync","getTemplateIndexHtmlAsync","TEMPLATES","find","value","id","file","promises","readFile","contents","replace","appendScriptsToHtml","appendLinkToHtml","map","href","as","rel","flat","addMeta","meta"],"mappings":";;;;;;;;;;;QA8DsBA;eAAAA;;QAjDAC;eAAAA;;;;yBAZuB;;;;;;;gEAC9B;;;;;;;gEACE;;;;;;2BAES;sBAC4B;8BAClB;;;;;;AAM7B,eAAeA,sCACpBC,WAAmB,EACnB,EACEC,OAAO,EACPC,QAAQ,EACRC,SAAS,EACTC,MAAMC,IAAAA,mBAAS,EAACL,aAAa;IAAEM,2BAA2B;AAAK,GAAGF,GAAG,EAOtE;QAGcA,UAKAA,WACDA;IAPd,OAAON,wBAAwBE,aAAa;QAC1CO,aAAaH,EAAAA,WAAAA,IAAII,GAAG,qBAAPJ,SAASK,IAAI,KAAI;QAC9BR;QACAC;QACAC;QACAO,OAAOC,IAAAA,2BAAiB,EAACP,KAAKQ,OAAO,IAAI;QACzCC,WAAW,GAAET,YAAAA,IAAII,GAAG,qBAAPJ,UAASS,WAAW;QACjCC,UAAU,GAAEV,YAAAA,IAAII,GAAG,qBAAPJ,UAASU,UAAU;IACjC;AACF;AAEA,SAASC,6BACPf,WAAmB,EACnB,EAAEgB,QAAQ,EAAwB;IAElC,MAAMC,gBAAgBC,eAAI,CAACC,OAAO,CAACC,IAAAA,iCAAmB,EAACpB,cAAcgB;IACrE,IAAI,CAACK,aAAE,CAACC,UAAU,CAACL,gBAAgB;QACjC,OAAO;IACT;IACA,OAAOA;AAC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ES,KAAK,UAAU,CAAC;AAC9D"}
|
|
@@ -26,7 +26,7 @@ class FetchClient {
|
|
|
26
26
|
this.headers = {
|
|
27
27
|
accept: 'application/json',
|
|
28
28
|
'content-type': 'application/json',
|
|
29
|
-
'user-agent': `expo-cli/${"
|
|
29
|
+
'user-agent': `expo-cli/${"57.0.0"}`,
|
|
30
30
|
authorization: 'Basic ' + _nodebuffer().Buffer.from(`${target}:`).toString('base64')
|
|
31
31
|
};
|
|
32
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "57.0.0",
|
|
4
4
|
"description": "The Expo CLI",
|
|
5
5
|
"main": "main.js",
|
|
6
6
|
"bin": {
|
|
@@ -39,28 +39,28 @@
|
|
|
39
39
|
"homepage": "https://github.com/expo/expo/tree/main/packages/@expo/cli",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@expo/code-signing-certificates": "^0.0.6",
|
|
42
|
-
"@expo/config": "~
|
|
43
|
-
"@expo/config-plugins": "~
|
|
42
|
+
"@expo/config": "~57.0.0",
|
|
43
|
+
"@expo/config-plugins": "~57.0.0",
|
|
44
44
|
"@expo/devcert": "^1.2.1",
|
|
45
|
-
"@expo/env": "~2.
|
|
46
|
-
"@expo/image-utils": "^0.
|
|
47
|
-
"@expo/inline-modules": "^0.0
|
|
48
|
-
"@expo/json-file": "^
|
|
49
|
-
"@expo/log-box": "^
|
|
45
|
+
"@expo/env": "~2.4.0",
|
|
46
|
+
"@expo/image-utils": "^0.11.0",
|
|
47
|
+
"@expo/inline-modules": "^0.1.0",
|
|
48
|
+
"@expo/json-file": "^11.0.0",
|
|
49
|
+
"@expo/log-box": "^57.0.0",
|
|
50
50
|
"@expo/metro": "~56.0.0",
|
|
51
|
-
"@expo/metro-config": "~
|
|
52
|
-
"@expo/metro-file-map": "^
|
|
53
|
-
"@expo/osascript": "^2.
|
|
54
|
-
"@expo/package-manager": "^1.
|
|
55
|
-
"@expo/plist": "^0.
|
|
56
|
-
"@expo/prebuild-config": "^
|
|
57
|
-
"@expo/require-utils": "^
|
|
58
|
-
"@expo/router-server": "^
|
|
59
|
-
"@expo/schema-utils": "^
|
|
51
|
+
"@expo/metro-config": "~57.0.0",
|
|
52
|
+
"@expo/metro-file-map": "^57.0.0",
|
|
53
|
+
"@expo/osascript": "^2.7.0",
|
|
54
|
+
"@expo/package-manager": "^1.13.0",
|
|
55
|
+
"@expo/plist": "^0.8.0",
|
|
56
|
+
"@expo/prebuild-config": "^57.0.0",
|
|
57
|
+
"@expo/require-utils": "^57.0.0",
|
|
58
|
+
"@expo/router-server": "^57.0.0",
|
|
59
|
+
"@expo/schema-utils": "^57.0.0",
|
|
60
60
|
"@expo/spawn-async": "^1.8.0",
|
|
61
61
|
"@expo/ws-tunnel": "^2.0.0",
|
|
62
62
|
"@expo/xcpretty": "^4.4.4",
|
|
63
|
-
"@react-native/dev-middleware": "0.
|
|
63
|
+
"@react-native/dev-middleware": "0.86.0",
|
|
64
64
|
"accepts": "^1.3.8",
|
|
65
65
|
"arg": "^5.0.2",
|
|
66
66
|
"bplist-creator": "0.1.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"connect": "^3.7.0",
|
|
72
72
|
"debug": "^4.3.4",
|
|
73
73
|
"dnssd-advertise": "^1.1.4",
|
|
74
|
-
"expo-server": "^
|
|
74
|
+
"expo-server": "^57.0.0",
|
|
75
75
|
"fetch-nodeshim": "^0.4.10",
|
|
76
76
|
"getenv": "^2.0.0",
|
|
77
77
|
"glob": "^13.0.0",
|
|
@@ -156,13 +156,13 @@
|
|
|
156
156
|
"playwright": "^1.59.0",
|
|
157
157
|
"taskr": "^1.1.0",
|
|
158
158
|
"tree-kill": "^1.2.2",
|
|
159
|
-
"expo": "
|
|
159
|
+
"expo": "57.0.0-preview.0",
|
|
160
|
+
"@expo/fingerprint": "0.20.0",
|
|
160
161
|
"expo-module-scripts": "56.0.3",
|
|
161
|
-
"expo-modules-autolinking": "
|
|
162
|
-
"
|
|
163
|
-
"expo-router": "56.2.11"
|
|
162
|
+
"expo-modules-autolinking": "57.0.0",
|
|
163
|
+
"expo-router": "57.0.0"
|
|
164
164
|
},
|
|
165
|
-
"gitHead": "
|
|
165
|
+
"gitHead": "e3eb896c5fdcd89e0cded98ff4e35c9db12cc9c0",
|
|
166
166
|
"scripts": {
|
|
167
167
|
"build": "taskr",
|
|
168
168
|
"clean": "expo-module clean",
|