@expo/cli 57.0.27 → 57.0.28

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 CHANGED
@@ -139,7 +139,7 @@ const args = (0, _arg().default)({
139
139
  });
140
140
  if (args['--version']) {
141
141
  // Version is added in the build script.
142
- console.log("57.0.27");
142
+ console.log("57.0.28");
143
143
  process.exit(0);
144
144
  }
145
145
  if (args['--non-interactive']) {
@@ -76,7 +76,7 @@ function getInitMetadata() {
76
76
  return {
77
77
  format: 'v0-jsonl',
78
78
  // Version is added in the build script.
79
- version: "57.0.27" ?? 'UNVERSIONED'
79
+ version: "57.0.28" ?? 'UNVERSIONED'
80
80
  };
81
81
  }
82
82
  function getWellKnownTemporaryLogFile(projectRoot, command) {
@@ -8,6 +8,13 @@ Object.defineProperty(exports, "resolveLocalTemplateAsync", {
8
8
  return resolveLocalTemplateAsync;
9
9
  }
10
10
  });
11
+ function _requireutils() {
12
+ const data = require("@expo/require-utils");
13
+ _requireutils = function() {
14
+ return data;
15
+ };
16
+ return data;
17
+ }
11
18
  function _fs() {
12
19
  const data = /*#__PURE__*/ _interop_require_default(require("fs"));
13
20
  _fs = function() {
@@ -22,13 +29,6 @@ function _path() {
22
29
  };
23
30
  return data;
24
31
  }
25
- function _resolvefrom() {
26
- const data = /*#__PURE__*/ _interop_require_default(require("resolve-from"));
27
- _resolvefrom = function() {
28
- return data;
29
- };
30
- return data;
31
- }
32
32
  const _npm = require("../utils/npm");
33
33
  function _interop_require_default(obj) {
34
34
  return obj && obj.__esModule ? obj : {
@@ -61,7 +61,13 @@ async function resolveLocalTemplateAsync({ templateDirectory, projectRoot, exp }
61
61
  }
62
62
  } else {
63
63
  // The default is to use `expo/template.tgz` which exists in all published versions of it
64
- templatePath = (0, _resolvefrom().default)(projectRoot, 'expo/template.tgz');
64
+ const resolvedTemplatePath = (0, _requireutils().resolveFrom)(projectRoot, 'expo/template.tgz', {
65
+ extensions: []
66
+ });
67
+ if (!resolvedTemplatePath) {
68
+ throw new Error(`Cannot resolve 'expo/template.tgz' from '${projectRoot}'`);
69
+ }
70
+ templatePath = resolvedTemplatePath;
65
71
  debug('Using local template from Expo package:', templatePath);
66
72
  }
67
73
  return await (0, _npm.extractLocalNpmTarballAsync)(templatePath, templateDirectory, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/prebuild/resolveLocalTemplate.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config';\nimport fs from 'fs';\nimport path from 'path';\nimport resolveFrom from 'resolve-from';\n\nimport { packNpmTarballAsync, extractLocalNpmTarballAsync } from '../utils/npm';\n\nconst debug = require('debug')('expo:prebuild:resolveLocalTemplate') as typeof console.log;\n\n/** Returns the `local-template` target path, only for the `expo/expo` monorepo */\nconst getMonorepoTemplatePath = async () => {\n const cliPath = path.dirname(require.resolve('@expo/cli/package.json'));\n const localTemplateOriginPath = path.join(cliPath, 'local-template');\n try {\n return await fs.promises.realpath(localTemplateOriginPath);\n } catch {\n return null;\n }\n};\n\nexport async function resolveLocalTemplateAsync({\n templateDirectory,\n projectRoot,\n exp,\n}: {\n templateDirectory: string;\n projectRoot: string;\n exp: Pick<ExpoConfig, 'name'>;\n}): Promise<string> {\n let templatePath: string;\n\n // In the expo/expo monorepo only, we use `templates/expo-template-bare-minimum` directly\n const monorepoTemplatePath = await getMonorepoTemplatePath();\n if (monorepoTemplatePath) {\n debug('Packing local template from expo-template-bare-minimum path:', monorepoTemplatePath);\n try {\n templatePath = await packNpmTarballAsync(monorepoTemplatePath);\n debug('Using packed local template at:', templatePath);\n } catch (error) {\n // We're vocal here about an error, since we don't expect this to fail, and it's only for our monorepo\n console.error(\n `Failed to pack local expo-template-bare-minimum to be used as a prebuild template:\\n`,\n error\n );\n throw error;\n }\n } else {\n // The default is to use `expo/template.tgz` which exists in all published versions of it\n templatePath = resolveFrom(projectRoot, 'expo/template.tgz');\n debug('Using local template from Expo package:', templatePath);\n }\n\n return await extractLocalNpmTarballAsync(templatePath, templateDirectory, {\n expName: exp.name,\n });\n}\n"],"names":["resolveLocalTemplateAsync","debug","require","getMonorepoTemplatePath","cliPath","path","dirname","resolve","localTemplateOriginPath","join","fs","promises","realpath","templateDirectory","projectRoot","exp","templatePath","monorepoTemplatePath","packNpmTarballAsync","error","console","resolveFrom","extractLocalNpmTarballAsync","expName","name"],"mappings":";;;;+BAoBsBA;;;eAAAA;;;;gEAnBP;;;;;;;gEACE;;;;;;;gEACO;;;;;;qBAEyC;;;;;;AAEjE,MAAMC,QAAQC,QAAQ,SAAS;AAE/B,gFAAgF,GAChF,MAAMC,0BAA0B;IAC9B,MAAMC,UAAUC,eAAI,CAACC,OAAO,CAACJ,QAAQK,OAAO,CAAC;IAC7C,MAAMC,0BAA0BH,eAAI,CAACI,IAAI,CAACL,SAAS;IACnD,IAAI;QACF,OAAO,MAAMM,aAAE,CAACC,QAAQ,CAACC,QAAQ,CAACJ;IACpC,EAAE,OAAM;QACN,OAAO;IACT;AACF;AAEO,eAAeR,0BAA0B,EAC9Ca,iBAAiB,EACjBC,WAAW,EACXC,GAAG,EAKJ;IACC,IAAIC;IAEJ,yFAAyF;IACzF,MAAMC,uBAAuB,MAAMd;IACnC,IAAIc,sBAAsB;QACxBhB,MAAM,gEAAgEgB;QACtE,IAAI;YACFD,eAAe,MAAME,IAAAA,wBAAmB,EAACD;YACzChB,MAAM,mCAAmCe;QAC3C,EAAE,OAAOG,OAAO;YACd,sGAAsG;YACtGC,QAAQD,KAAK,CACX,CAAC,oFAAoF,CAAC,EACtFA;YAEF,MAAMA;QACR;IACF,OAAO;QACL,yFAAyF;QACzFH,eAAeK,IAAAA,sBAAW,EAACP,aAAa;QACxCb,MAAM,2CAA2Ce;IACnD;IAEA,OAAO,MAAMM,IAAAA,gCAA2B,EAACN,cAAcH,mBAAmB;QACxEU,SAASR,IAAIS,IAAI;IACnB;AACF"}
1
+ {"version":3,"sources":["../../../src/prebuild/resolveLocalTemplate.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config';\nimport { resolveFrom } from '@expo/require-utils';\nimport fs from 'fs';\nimport path from 'path';\n\nimport { packNpmTarballAsync, extractLocalNpmTarballAsync } from '../utils/npm';\n\nconst debug = require('debug')('expo:prebuild:resolveLocalTemplate') as typeof console.log;\n\n/** Returns the `local-template` target path, only for the `expo/expo` monorepo */\nconst getMonorepoTemplatePath = async () => {\n const cliPath = path.dirname(require.resolve('@expo/cli/package.json'));\n const localTemplateOriginPath = path.join(cliPath, 'local-template');\n try {\n return await fs.promises.realpath(localTemplateOriginPath);\n } catch {\n return null;\n }\n};\n\nexport async function resolveLocalTemplateAsync({\n templateDirectory,\n projectRoot,\n exp,\n}: {\n templateDirectory: string;\n projectRoot: string;\n exp: Pick<ExpoConfig, 'name'>;\n}): Promise<string> {\n let templatePath: string;\n\n // In the expo/expo monorepo only, we use `templates/expo-template-bare-minimum` directly\n const monorepoTemplatePath = await getMonorepoTemplatePath();\n if (monorepoTemplatePath) {\n debug('Packing local template from expo-template-bare-minimum path:', monorepoTemplatePath);\n try {\n templatePath = await packNpmTarballAsync(monorepoTemplatePath);\n debug('Using packed local template at:', templatePath);\n } catch (error) {\n // We're vocal here about an error, since we don't expect this to fail, and it's only for our monorepo\n console.error(\n `Failed to pack local expo-template-bare-minimum to be used as a prebuild template:\\n`,\n error\n );\n throw error;\n }\n } else {\n // The default is to use `expo/template.tgz` which exists in all published versions of it\n const resolvedTemplatePath = resolveFrom(projectRoot, 'expo/template.tgz', { extensions: [] });\n if (!resolvedTemplatePath) {\n throw new Error(`Cannot resolve 'expo/template.tgz' from '${projectRoot}'`);\n }\n templatePath = resolvedTemplatePath;\n debug('Using local template from Expo package:', templatePath);\n }\n\n return await extractLocalNpmTarballAsync(templatePath, templateDirectory, {\n expName: exp.name,\n });\n}\n"],"names":["resolveLocalTemplateAsync","debug","require","getMonorepoTemplatePath","cliPath","path","dirname","resolve","localTemplateOriginPath","join","fs","promises","realpath","templateDirectory","projectRoot","exp","templatePath","monorepoTemplatePath","packNpmTarballAsync","error","console","resolvedTemplatePath","resolveFrom","extensions","Error","extractLocalNpmTarballAsync","expName","name"],"mappings":";;;;+BAoBsBA;;;eAAAA;;;;yBAnBM;;;;;;;gEACb;;;;;;;gEACE;;;;;;qBAEgD;;;;;;AAEjE,MAAMC,QAAQC,QAAQ,SAAS;AAE/B,gFAAgF,GAChF,MAAMC,0BAA0B;IAC9B,MAAMC,UAAUC,eAAI,CAACC,OAAO,CAACJ,QAAQK,OAAO,CAAC;IAC7C,MAAMC,0BAA0BH,eAAI,CAACI,IAAI,CAACL,SAAS;IACnD,IAAI;QACF,OAAO,MAAMM,aAAE,CAACC,QAAQ,CAACC,QAAQ,CAACJ;IACpC,EAAE,OAAM;QACN,OAAO;IACT;AACF;AAEO,eAAeR,0BAA0B,EAC9Ca,iBAAiB,EACjBC,WAAW,EACXC,GAAG,EAKJ;IACC,IAAIC;IAEJ,yFAAyF;IACzF,MAAMC,uBAAuB,MAAMd;IACnC,IAAIc,sBAAsB;QACxBhB,MAAM,gEAAgEgB;QACtE,IAAI;YACFD,eAAe,MAAME,IAAAA,wBAAmB,EAACD;YACzChB,MAAM,mCAAmCe;QAC3C,EAAE,OAAOG,OAAO;YACd,sGAAsG;YACtGC,QAAQD,KAAK,CACX,CAAC,oFAAoF,CAAC,EACtFA;YAEF,MAAMA;QACR;IACF,OAAO;QACL,yFAAyF;QACzF,MAAME,uBAAuBC,IAAAA,2BAAW,EAACR,aAAa,qBAAqB;YAAES,YAAY,EAAE;QAAC;QAC5F,IAAI,CAACF,sBAAsB;YACzB,MAAM,IAAIG,MAAM,CAAC,yCAAyC,EAAEV,YAAY,CAAC,CAAC;QAC5E;QACAE,eAAeK;QACfpB,MAAM,2CAA2Ce;IACnD;IAEA,OAAO,MAAMS,IAAAA,gCAA2B,EAACT,cAAcH,mBAAmB;QACxEa,SAASX,IAAIY,IAAI;IACnB;AACF"}
@@ -30,7 +30,7 @@ const _isLocalHostname = (hostname)=>{
30
30
  }
31
31
  if (maybeIp === '::1') {
32
32
  return true;
33
- } else if (/^127(?:.\d+){3}$/.test(maybeIp)) {
33
+ } else if (/^127(?:\.\d+){3}$/.test(maybeIp)) {
34
34
  return maybeIp.split('.').every((part)=>{
35
35
  const num = parseInt(part, 10);
36
36
  return num >= 0 && num <= 255;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/start/server/middleware/CorsMiddleware.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config';\n\nimport type { ServerRequest, ServerResponse } from './server.types';\n\nconst DEFAULT_ALLOWED_CORS_HOSTS = [\n 'devtools', // Support local Chrome DevTools `devtools://devtools`\n];\n\n/** Check if hostname matches \"localhost\" exactly, the local IPv6,\n * a local IPV4 in the 127.0.0.0/8 range, or an IPv6-to-4 range\n * (starting with ::ffff: and ending in an IPv4) */\nexport const _isLocalHostname = (hostname: string) => {\n if (hostname === 'localhost') {\n return true;\n }\n let maybeIp = hostname;\n const ipv6To4Prefix = '::ffff:';\n if (maybeIp.startsWith(ipv6To4Prefix)) {\n maybeIp = maybeIp.slice(ipv6To4Prefix.length);\n }\n if (maybeIp === '::1') {\n return true;\n } else if (/^127(?:.\\d+){3}$/.test(maybeIp)) {\n return maybeIp.split('.').every((part) => {\n const num = parseInt(part, 10);\n return num >= 0 && num <= 255;\n });\n } else {\n return false;\n }\n};\n\nexport function createCorsMiddleware(exp: ExpoConfig) {\n const allowedHosts = [...DEFAULT_ALLOWED_CORS_HOSTS];\n // Support for expo-router API routes\n if (exp.extra?.router?.headOrigin) {\n allowedHosts.push(new URL(exp.extra.router.headOrigin).host);\n }\n if (exp.extra?.router?.origin) {\n allowedHosts.push(new URL(exp.extra.router.origin).host);\n }\n\n return (req: ServerRequest, res: ServerResponse, next: (err?: Error) => void) => {\n if (typeof req.headers.origin === 'string') {\n const { host, hostname } = new URL(req.headers.origin);\n const isSameOrigin = host === req.headers.host;\n const isLocalhost = _isLocalHostname(hostname);\n const isAllowedHost = allowedHosts.includes(host) || isLocalhost;\n if (!isSameOrigin && !isAllowedHost) {\n next(\n new Error(\n `Unauthorized request from ${req.headers.origin}. ` +\n 'This may happen because of a conflicting browser extension to intercept HTTP requests. ' +\n 'Disable browser extensions or use incognito mode and try again.'\n )\n );\n return;\n } else if (!isLocalhost && isAllowedHost) {\n // Skipped for localhost to only allow requests from this dev-sever and not escalate\n // the cross-origin resource sharing that's allowed beyond the browser's defaults\n res.setHeader('Access-Control-Allow-Origin', req.headers.origin);\n }\n\n maybePreventMetroResetCorsHeader(req, res);\n }\n\n // Block MIME-type sniffing.\n res.setHeader('X-Content-Type-Options', 'nosniff');\n\n next();\n };\n}\n\n// When accessing source maps,\n// metro will overwrite the `Access-Control-Allow-Origin` header with hardcoded `devtools://devtools` value.\n// https://github.com/facebook/metro/blob/a7f8955e6d2424b0d5f73d4bcdaf22560e1d5f27/packages/metro/src/Server.js#L540\n// This is a workaround to prevent this behavior.\nfunction maybePreventMetroResetCorsHeader(req: ServerRequest, res: ServerResponse) {\n const pathname = req.url ? new URL(req.url, `http://${req.headers.host}`).pathname : '';\n if (pathname.endsWith('.map')) {\n const setHeader = res.setHeader.bind(res);\n res.setHeader = (key, ...args) => {\n if (key !== 'Access-Control-Allow-Origin') {\n setHeader(key, ...args);\n }\n return res;\n };\n }\n}\n"],"names":["_isLocalHostname","createCorsMiddleware","DEFAULT_ALLOWED_CORS_HOSTS","hostname","maybeIp","ipv6To4Prefix","startsWith","slice","length","test","split","every","part","num","parseInt","exp","allowedHosts","extra","router","headOrigin","push","URL","host","origin","req","res","next","headers","isSameOrigin","isLocalhost","isAllowedHost","includes","Error","setHeader","maybePreventMetroResetCorsHeader","pathname","url","endsWith","bind","key","args"],"mappings":";;;;;;;;;;;QAWaA;eAAAA;;QAqBGC;eAAAA;;;AA5BhB,MAAMC,6BAA6B;IACjC;CACD;AAKM,MAAMF,mBAAmB,CAACG;IAC/B,IAAIA,aAAa,aAAa;QAC5B,OAAO;IACT;IACA,IAAIC,UAAUD;IACd,MAAME,gBAAgB;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B,EAAER,IAAIG,OAAO,CAACJ,MAAM,CAAC,EAAE,CAAC,GACjD,4FACA;gBAGN;YACF,OAAO,IAAI,CAACM,eAAeC,eAAe;gBACxC,oFAAoF;gBACpF,iFAAiF;gBACjFL,IAAIQ,SAAS,CAAC,+BAA+BT,IAAIG,OAAO,CAACJ,MAAM;YACjE;YAEAW,iCAAiCV,KAAKC;QACxC;QAEA,4BAA4B;QAC5BA,IAAIQ,SAAS,CAAC,0BAA0B;QAExCP;IACF;AACF;AAEA,8BAA8B;AAC9B,4GAA4G;AAC5G,oHAAoH;AACpH,iDAAiD;AACjD,SAASQ,iCAAiCV,GAAkB,EAAEC,GAAmB;IAC/E,MAAMU,WAAWX,IAAIY,GAAG,GAAG,IAAIf,IAAIG,IAAIY,GAAG,EAAE,CAAC,OAAO,EAAEZ,IAAIG,OAAO,CAACL,IAAI,EAAE,EAAEa,QAAQ,GAAG;IACrF,IAAIA,SAASE,QAAQ,CAAC,SAAS;QAC7B,MAAMJ,YAAYR,IAAIQ,SAAS,CAACK,IAAI,CAACb;QACrCA,IAAIQ,SAAS,GAAG,CAACM,KAAK,GAAGC;YACvB,IAAID,QAAQ,+BAA+B;gBACzCN,UAAUM,QAAQC;YACpB;YACA,OAAOf;QACT;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../../src/start/server/middleware/CorsMiddleware.ts"],"sourcesContent":["import type { ExpoConfig } from '@expo/config';\n\nimport type { ServerRequest, ServerResponse } from './server.types';\n\nconst DEFAULT_ALLOWED_CORS_HOSTS = [\n 'devtools', // Support local Chrome DevTools `devtools://devtools`\n];\n\n/** Check if hostname matches \"localhost\" exactly, the local IPv6,\n * a local IPV4 in the 127.0.0.0/8 range, or an IPv6-to-4 range\n * (starting with ::ffff: and ending in an IPv4) */\nexport const _isLocalHostname = (hostname: string) => {\n if (hostname === 'localhost') {\n return true;\n }\n let maybeIp = hostname;\n const ipv6To4Prefix = '::ffff:';\n if (maybeIp.startsWith(ipv6To4Prefix)) {\n maybeIp = maybeIp.slice(ipv6To4Prefix.length);\n }\n if (maybeIp === '::1') {\n return true;\n } else if (/^127(?:\\.\\d+){3}$/.test(maybeIp)) {\n return maybeIp.split('.').every((part) => {\n const num = parseInt(part, 10);\n return num >= 0 && num <= 255;\n });\n } else {\n return false;\n }\n};\n\nexport function createCorsMiddleware(exp: ExpoConfig) {\n const allowedHosts = [...DEFAULT_ALLOWED_CORS_HOSTS];\n // Support for expo-router API routes\n if (exp.extra?.router?.headOrigin) {\n allowedHosts.push(new URL(exp.extra.router.headOrigin).host);\n }\n if (exp.extra?.router?.origin) {\n allowedHosts.push(new URL(exp.extra.router.origin).host);\n }\n\n return (req: ServerRequest, res: ServerResponse, next: (err?: Error) => void) => {\n if (typeof req.headers.origin === 'string') {\n const { host, hostname } = new URL(req.headers.origin);\n const isSameOrigin = host === req.headers.host;\n const isLocalhost = _isLocalHostname(hostname);\n const isAllowedHost = allowedHosts.includes(host) || isLocalhost;\n if (!isSameOrigin && !isAllowedHost) {\n next(\n new Error(\n `Unauthorized request from ${req.headers.origin}. ` +\n 'This may happen because of a conflicting browser extension to intercept HTTP requests. ' +\n 'Disable browser extensions or use incognito mode and try again.'\n )\n );\n return;\n } else if (!isLocalhost && isAllowedHost) {\n // Skipped for localhost to only allow requests from this dev-sever and not escalate\n // the cross-origin resource sharing that's allowed beyond the browser's defaults\n res.setHeader('Access-Control-Allow-Origin', req.headers.origin);\n }\n\n maybePreventMetroResetCorsHeader(req, res);\n }\n\n // Block MIME-type sniffing.\n res.setHeader('X-Content-Type-Options', 'nosniff');\n\n next();\n };\n}\n\n// When accessing source maps,\n// metro will overwrite the `Access-Control-Allow-Origin` header with hardcoded `devtools://devtools` value.\n// https://github.com/facebook/metro/blob/a7f8955e6d2424b0d5f73d4bcdaf22560e1d5f27/packages/metro/src/Server.js#L540\n// This is a workaround to prevent this behavior.\nfunction maybePreventMetroResetCorsHeader(req: ServerRequest, res: ServerResponse) {\n const pathname = req.url ? new URL(req.url, `http://${req.headers.host}`).pathname : '';\n if (pathname.endsWith('.map')) {\n const setHeader = res.setHeader.bind(res);\n res.setHeader = (key, ...args) => {\n if (key !== 'Access-Control-Allow-Origin') {\n setHeader(key, ...args);\n }\n return res;\n };\n }\n}\n"],"names":["_isLocalHostname","createCorsMiddleware","DEFAULT_ALLOWED_CORS_HOSTS","hostname","maybeIp","ipv6To4Prefix","startsWith","slice","length","test","split","every","part","num","parseInt","exp","allowedHosts","extra","router","headOrigin","push","URL","host","origin","req","res","next","headers","isSameOrigin","isLocalhost","isAllowedHost","includes","Error","setHeader","maybePreventMetroResetCorsHeader","pathname","url","endsWith","bind","key","args"],"mappings":";;;;;;;;;;;QAWaA;eAAAA;;QAqBGC;eAAAA;;;AA5BhB,MAAMC,6BAA6B;IACjC;CACD;AAKM,MAAMF,mBAAmB,CAACG;IAC/B,IAAIA,aAAa,aAAa;QAC5B,OAAO;IACT;IACA,IAAIC,UAAUD;IACd,MAAME,gBAAgB;IACtB,IAAID,QAAQE,UAAU,CAACD,gBAAgB;QACrCD,UAAUA,QAAQG,KAAK,CAACF,cAAcG,MAAM;IAC9C;IACA,IAAIJ,YAAY,OAAO;QACrB,OAAO;IACT,OAAO,IAAI,oBAAoBK,IAAI,CAACL,UAAU;QAC5C,OAAOA,QAAQM,KAAK,CAAC,KAAKC,KAAK,CAAC,CAACC;YAC/B,MAAMC,MAAMC,SAASF,MAAM;YAC3B,OAAOC,OAAO,KAAKA,OAAO;QAC5B;IACF,OAAO;QACL,OAAO;IACT;AACF;AAEO,SAASZ,qBAAqBc,GAAe;QAG9CA,mBAAAA,YAGAA,oBAAAA;IALJ,MAAMC,eAAe;WAAId;KAA2B;IACpD,qCAAqC;IACrC,KAAIa,aAAAA,IAAIE,KAAK,sBAATF,oBAAAA,WAAWG,MAAM,qBAAjBH,kBAAmBI,UAAU,EAAE;QACjCH,aAAaI,IAAI,CAAC,IAAIC,IAAIN,IAAIE,KAAK,CAACC,MAAM,CAACC,UAAU,EAAEG,IAAI;IAC7D;I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IAAI,CAACb;QACrCA,IAAIQ,SAAS,GAAG,CAACM,KAAK,GAAGC;YACvB,IAAID,QAAQ,+BAA+B;gBACzCN,UAAUM,QAAQC;YACpB;YACA,OAAOf;QACT;IACF;AACF"}
@@ -36,6 +36,9 @@ function set(obj, key, value) {
36
36
  let current = obj;
37
37
  let branch;
38
38
  while(branch = branches.shift()){
39
+ if (branch === '__proto__' || branch === 'constructor' || branch === 'prototype') {
40
+ return obj;
41
+ }
39
42
  if (branches.length === 0) {
40
43
  current[branch] = value;
41
44
  return obj;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/utils/obj.ts"],"sourcesContent":["/** `lodash.get` */\nexport function get(obj: any, key: string): any | null {\n const branches = key.split('.');\n let current: any = obj;\n let branch: string | undefined;\n while ((branch = branches.shift())) {\n if (!(branch in current)) {\n return null;\n }\n current = current[branch];\n }\n return current;\n}\n\n/** `lodash.set` */\nexport function set(obj: any, key: string, value: any): any | null {\n const branches = key.split('.');\n let current: any = obj;\n let branch: string | undefined;\n while ((branch = branches.shift())) {\n if (branches.length === 0) {\n current[branch] = value;\n return obj;\n }\n\n if (!(branch in current)) {\n current[branch] = {};\n }\n\n current = current[branch];\n }\n return null;\n}\n\n/** `lodash.pickBy` */\nexport function pickBy<T>(\n obj: { [key: string]: T },\n predicate: (value: T, key: string) => boolean | undefined\n) {\n return Object.entries(obj).reduce(\n (acc, [key, value]) => {\n if (predicate(value, key)) {\n acc[key] = value;\n }\n return acc;\n },\n {} as { [key: string]: T }\n );\n}\n"],"names":["get","pickBy","set","obj","key","branches","split","current","branch","shift","value","length","predicate","Object","entries","reduce","acc"],"mappings":"AAAA,iBAAiB;;;;;;;;;;;QACDA;eAAAA;;QAkCAC;eAAAA;;QApBAC;eAAAA;;;AAdT,SAASF,IAAIG,GAAQ,EAAEC,GAAW;IACvC,MAAMC,WAAWD,IAAIE,KAAK,CAAC;IAC3B,IAAIC,UAAeJ;IACnB,IAAIK;IACJ,MAAQA,SAASH,SAASI,KAAK,GAAK;QAClC,IAAI,CAAED,CAAAA,UAAUD,OAAM,GAAI;YACxB,OAAO;QACT;QACAA,UAAUA,OAAO,CAACC,OAAO;IAC3B;IACA,OAAOD;AACT;AAGO,SAASL,IAAIC,GAAQ,EAAEC,GAAW,EAAEM,KAAU;IACnD,MAAML,WAAWD,IAAIE,KAAK,CAAC;IAC3B,IAAIC,UAAeJ;IACnB,IAAIK;IACJ,MAAQA,SAASH,SAASI,KAAK,GAAK;QAClC,IAAIJ,SAASM,MAAM,KAAK,GAAG;YACzBJ,OAAO,CAACC,OAAO,GAAGE;YAClB,OAAOP;QACT;QAEA,IAAI,CAAEK,CAAAA,UAAUD,OAAM,GAAI;YACxBA,OAAO,CAACC,OAAO,GAAG,CAAC;QACrB;QAEAD,UAAUA,OAAO,CAACC,OAAO;IAC3B;IACA,OAAO;AACT;AAGO,SAASP,OACdE,GAAyB,EACzBS,SAAyD;IAEzD,OAAOC,OAAOC,OAAO,CAACX,KAAKY,MAAM,CAC/B,CAACC,KAAK,CAACZ,KAAKM,MAAM;QAChB,IAAIE,UAAUF,OAAON,MAAM;YACzBY,GAAG,CAACZ,IAAI,GAAGM;QACb;QACA,OAAOM;IACT,GACA,CAAC;AAEL"}
1
+ {"version":3,"sources":["../../../src/utils/obj.ts"],"sourcesContent":["/** `lodash.get` */\nexport function get(obj: any, key: string): any | null {\n const branches = key.split('.');\n let current: any = obj;\n let branch: string | undefined;\n while ((branch = branches.shift())) {\n if (!(branch in current)) {\n return null;\n }\n current = current[branch];\n }\n return current;\n}\n\n/** `lodash.set` */\nexport function set(obj: any, key: string, value: any): any | null {\n const branches = key.split('.');\n let current: any = obj;\n let branch: string | undefined;\n while ((branch = branches.shift())) {\n if (branch === '__proto__' || branch === 'constructor' || branch === 'prototype') {\n return obj;\n }\n\n if (branches.length === 0) {\n current[branch] = value;\n return obj;\n }\n\n if (!(branch in current)) {\n current[branch] = {};\n }\n\n current = current[branch];\n }\n return null;\n}\n\n/** `lodash.pickBy` */\nexport function pickBy<T>(\n obj: { [key: string]: T },\n predicate: (value: T, key: string) => boolean | undefined\n) {\n return Object.entries(obj).reduce(\n (acc, [key, value]) => {\n if (predicate(value, key)) {\n acc[key] = value;\n }\n return acc;\n },\n {} as { [key: string]: T }\n );\n}\n"],"names":["get","pickBy","set","obj","key","branches","split","current","branch","shift","value","length","predicate","Object","entries","reduce","acc"],"mappings":"AAAA,iBAAiB;;;;;;;;;;;QACDA;eAAAA;;QAsCAC;eAAAA;;QAxBAC;eAAAA;;;AAdT,SAASF,IAAIG,GAAQ,EAAEC,GAAW;IACvC,MAAMC,WAAWD,IAAIE,KAAK,CAAC;IAC3B,IAAIC,UAAeJ;IACnB,IAAIK;IACJ,MAAQA,SAASH,SAASI,KAAK,GAAK;QAClC,IAAI,CAAED,CAAAA,UAAUD,OAAM,GAAI;YACxB,OAAO;QACT;QACAA,UAAUA,OAAO,CAACC,OAAO;IAC3B;IACA,OAAOD;AACT;AAGO,SAASL,IAAIC,GAAQ,EAAEC,GAAW,EAAEM,KAAU;IACnD,MAAML,WAAWD,IAAIE,KAAK,CAAC;IAC3B,IAAIC,UAAeJ;IACnB,IAAIK;IACJ,MAAQA,SAASH,SAASI,KAAK,GAAK;QAClC,IAAID,WAAW,eAAeA,WAAW,iBAAiBA,WAAW,aAAa;YAChF,OAAOL;QACT;QAEA,IAAIE,SAASM,MAAM,KAAK,GAAG;YACzBJ,OAAO,CAACC,OAAO,GAAGE;YAClB,OAAOP;QACT;QAEA,IAAI,CAAEK,CAAAA,UAAUD,OAAM,GAAI;YACxBA,OAAO,CAACC,OAAO,GAAG,CAAC;QACrB;QAEAD,UAAUA,OAAO,CAACC,OAAO;IAC3B;IACA,OAAO;AACT;AAGO,SAASP,OACdE,GAAyB,EACzBS,SAAyD;IAEzD,OAAOC,OAAOC,OAAO,CAACX,KAAKY,MAAM,CAC/B,CAACC,KAAK,CAACZ,KAAKM,MAAM;QAChB,IAAIE,UAAUF,OAAON,MAAM;YACzBY,GAAG,CAACZ,IAAI,GAAGM;QACb;QACA,OAAOM;IACT,GACA,CAAC;AAEL"}
@@ -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/${"57.0.27"}`,
29
+ 'user-agent': `expo-cli/${"57.0.28"}`,
30
30
  authorization: 'Basic ' + _nodebuffer().Buffer.from(`${target}:`).toString('base64')
31
31
  };
32
32
  }
@@ -83,7 +83,7 @@ function createContext() {
83
83
  cpu: summarizeCpuInfo(),
84
84
  app: {
85
85
  name: 'expo/cli',
86
- version: "57.0.27"
86
+ version: "57.0.28"
87
87
  },
88
88
  ci: _ciinfo().isCI ? {
89
89
  name: _ciinfo().name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/cli",
3
- "version": "57.0.27",
3
+ "version": "57.0.28",
4
4
  "description": "The Expo CLI",
5
5
  "main": "main.js",
6
6
  "bin": {
@@ -38,23 +38,23 @@
38
38
  "homepage": "https://github.com/expo/expo/tree/main/packages/@expo/cli",
39
39
  "dependencies": {
40
40
  "@expo/code-signing-certificates": "^0.0.6",
41
- "@expo/config": "~57.0.9",
42
- "@expo/config-plugins": "~57.0.9",
41
+ "@expo/config": "~57.0.10",
42
+ "@expo/config-plugins": "~57.0.10",
43
43
  "@expo/devcert": "^1.2.1",
44
44
  "@expo/env": "~2.4.3",
45
- "@expo/image-utils": "^0.11.5",
45
+ "@expo/image-utils": "^0.11.6",
46
46
  "@expo/inline-modules": "^0.1.7",
47
47
  "@expo/json-file": "^11.0.1",
48
48
  "@expo/log-box": "^57.0.4",
49
49
  "@expo/metro": "~56.0.2",
50
- "@expo/metro-config": "~57.0.12",
51
- "@expo/metro-file-map": "^57.0.3",
50
+ "@expo/metro-config": "~57.0.13",
51
+ "@expo/metro-file-map": "^57.0.4",
52
52
  "@expo/osascript": "^2.7.1",
53
53
  "@expo/package-manager": "^1.13.1",
54
54
  "@expo/plist": "^0.8.1",
55
- "@expo/prebuild-config": "^57.0.16",
56
- "@expo/require-utils": "^57.0.5",
57
- "@expo/router-server": "^57.0.11",
55
+ "@expo/prebuild-config": "^57.0.17",
56
+ "@expo/require-utils": "^57.0.6",
57
+ "@expo/router-server": "^57.0.12",
58
58
  "@expo/schema-utils": "^57.0.2",
59
59
  "@expo/spawn-async": "^1.8.0",
60
60
  "@expo/ws-tunnel": "^2.0.0",
@@ -157,13 +157,13 @@
157
157
  "playwright": "^1.59.0",
158
158
  "taskr": "^1.1.0",
159
159
  "tree-kill": "^1.2.2",
160
+ "expo": "57.0.27",
160
161
  "@expo/fingerprint": "0.20.13",
161
- "expo": "57.0.25",
162
- "expo-module-scripts": "56.0.3",
163
- "expo-router": "57.0.23",
164
- "expo-modules-autolinking": "57.0.13"
162
+ "expo-modules-autolinking": "57.0.14",
163
+ "expo-router": "57.0.25",
164
+ "expo-module-scripts": "56.0.3"
165
165
  },
166
- "gitHead": "9349d1457178dd9cccb8bdd3aed47473c49134e1",
166
+ "gitHead": "50ac74f1ab5682c8e32b24da6e5e97dd4dbbb80f",
167
167
  "scripts": {
168
168
  "build": "taskr",
169
169
  "clean": "expo-module clean",