@expo/cli 55.0.0-canary-20260114-d8e19f5 → 55.0.0-canary-20260119-70f7c28

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.
Files changed (28) hide show
  1. package/build/bin/cli +1 -1
  2. package/build/src/export/embed/exportEmbedAsync.js +1 -2
  3. package/build/src/export/embed/exportEmbedAsync.js.map +1 -1
  4. package/build/src/export/exportStaticAsync.js +8 -7
  5. package/build/src/export/exportStaticAsync.js.map +1 -1
  6. package/build/src/start/server/Bonjour.js +100 -0
  7. package/build/src/start/server/Bonjour.js.map +1 -0
  8. package/build/src/start/server/BundlerDevServer.js +22 -4
  9. package/build/src/start/server/BundlerDevServer.js.map +1 -1
  10. package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js +10 -2
  11. package/build/src/start/server/metro/DevToolsPluginWebsocketEndpoint.js.map +1 -1
  12. package/build/src/start/server/metro/MetroBundlerDevServer.js +32 -26
  13. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  14. package/build/src/start/server/metro/createServerRouteMiddleware.js +25 -1
  15. package/build/src/start/server/metro/createServerRouteMiddleware.js.map +1 -1
  16. package/build/src/start/server/metro/debugging/createDebugMiddleware.js +22 -8
  17. package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
  18. package/build/src/start/server/metro/instantiateMetro.js +17 -6
  19. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  20. package/build/src/utils/env.js +14 -0
  21. package/build/src/utils/env.js.map +1 -1
  22. package/build/src/utils/net.js +43 -0
  23. package/build/src/utils/net.js.map +1 -0
  24. package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
  25. package/build/src/utils/telemetry/utils/context.js +1 -1
  26. package/package.json +19 -18
  27. package/build/src/start/server/middleware/DataLoaderModuleMiddleware.js +0 -75
  28. package/build/src/start/server/middleware/DataLoaderModuleMiddleware.js.map +0 -1
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ isLocalSocket: function() {
13
+ return isLocalSocket;
14
+ },
15
+ isMatchingOrigin: function() {
16
+ return isMatchingOrigin;
17
+ }
18
+ });
19
+ const ipv6To4Prefix = '::ffff:';
20
+ const isLocalSocket = (socket)=>{
21
+ let { localAddress, remoteAddress, remoteFamily } = socket;
22
+ const isLoopbackRequest = localAddress && localAddress === remoteAddress;
23
+ if (isLoopbackRequest) {
24
+ return true;
25
+ } else if (!remoteAddress || !remoteFamily) {
26
+ return false;
27
+ }
28
+ if (remoteFamily === 'IPv6' && remoteAddress.startsWith(ipv6To4Prefix)) {
29
+ remoteAddress = remoteAddress.slice(ipv6To4Prefix.length);
30
+ }
31
+ return remoteAddress === '::1' || remoteAddress.startsWith('127.');
32
+ };
33
+ const isMatchingOrigin = (request, serverBaseUrl)=>{
34
+ // NOTE(@kitten): The browser will always send an origin header for websocket upgrade connections
35
+ if (!request.headers.origin) {
36
+ return true;
37
+ }
38
+ const actualHost = new URL(`${request.headers.origin}`).host;
39
+ const expectedHost = new URL(serverBaseUrl).host;
40
+ return actualHost === expectedHost;
41
+ };
42
+
43
+ //# sourceMappingURL=net.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/utils/net.ts"],"sourcesContent":["import type { IncomingHttpHeaders } from 'node:http';\nimport type { Socket } from 'node:net';\n\nconst ipv6To4Prefix = '::ffff:';\n\nexport const isLocalSocket = (socket: Socket): boolean => {\n let { localAddress, remoteAddress, remoteFamily } = socket;\n\n const isLoopbackRequest = localAddress && localAddress === remoteAddress;\n if (isLoopbackRequest) {\n return true;\n } else if (!remoteAddress || !remoteFamily) {\n return false;\n }\n\n if (remoteFamily === 'IPv6' && remoteAddress.startsWith(ipv6To4Prefix)) {\n remoteAddress = remoteAddress.slice(ipv6To4Prefix.length);\n }\n\n return remoteAddress === '::1' || remoteAddress.startsWith('127.');\n};\n\ninterface AbstractIncomingMessage {\n headers: IncomingHttpHeaders | Record<string, string | string[]>;\n}\n\nexport const isMatchingOrigin = (\n request: AbstractIncomingMessage,\n serverBaseUrl: string\n): boolean => {\n // NOTE(@kitten): The browser will always send an origin header for websocket upgrade connections\n if (!request.headers.origin) {\n return true;\n }\n const actualHost = new URL(`${request.headers.origin}`).host;\n const expectedHost = new URL(serverBaseUrl).host;\n return actualHost === expectedHost;\n};\n"],"names":["isLocalSocket","isMatchingOrigin","ipv6To4Prefix","socket","localAddress","remoteAddress","remoteFamily","isLoopbackRequest","startsWith","slice","length","request","serverBaseUrl","headers","origin","actualHost","URL","host","expectedHost"],"mappings":";;;;;;;;;;;IAKaA,aAAa;eAAbA;;IAqBAC,gBAAgB;eAAhBA;;;AAvBb,MAAMC,gBAAgB;AAEf,MAAMF,gBAAgB,CAACG;IAC5B,IAAI,EAAEC,YAAY,EAAEC,aAAa,EAAEC,YAAY,EAAE,GAAGH;IAEpD,MAAMI,oBAAoBH,gBAAgBA,iBAAiBC;IAC3D,IAAIE,mBAAmB;QACrB,OAAO;IACT,OAAO,IAAI,CAACF,iBAAiB,CAACC,cAAc;QAC1C,OAAO;IACT;IAEA,IAAIA,iBAAiB,UAAUD,cAAcG,UAAU,CAACN,gBAAgB;QACtEG,gBAAgBA,cAAcI,KAAK,CAACP,cAAcQ,MAAM;IAC1D;IAEA,OAAOL,kBAAkB,SAASA,cAAcG,UAAU,CAAC;AAC7D;AAMO,MAAMP,mBAAmB,CAC9BU,SACAC;IAEA,iGAAiG;IACjG,IAAI,CAACD,QAAQE,OAAO,CAACC,MAAM,EAAE;QAC3B,OAAO;IACT;IACA,MAAMC,aAAa,IAAIC,IAAI,GAAGL,QAAQE,OAAO,CAACC,MAAM,EAAE,EAAEG,IAAI;IAC5D,MAAMC,eAAe,IAAIF,IAAIJ,eAAeK,IAAI;IAChD,OAAOF,eAAeG;AACxB"}
@@ -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/${"55.0.0-canary-20260114-d8e19f5"}`,
36
+ 'user-agent': `expo-cli/${"55.0.0-canary-20260119-70f7c28"}`,
37
37
  authorization: 'Basic ' + _nodebuffer().Buffer.from(`${target}:`).toString('base64')
38
38
  };
39
39
  }
@@ -83,7 +83,7 @@ function createContext() {
83
83
  cpu: summarizeCpuInfo(),
84
84
  app: {
85
85
  name: 'expo/cli',
86
- version: "55.0.0-canary-20260114-d8e19f5"
86
+ version: "55.0.0-canary-20260119-70f7c28"
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": "55.0.0-canary-20260114-d8e19f5",
3
+ "version": "55.0.0-canary-20260119-70f7c28",
4
4
  "description": "The Expo CLI",
5
5
  "main": "build/bin/cli",
6
6
  "bin": {
@@ -43,21 +43,21 @@
43
43
  "dependencies": {
44
44
  "@0no-co/graphql.web": "^1.0.8",
45
45
  "@expo/code-signing-certificates": "^0.0.6",
46
- "@expo/config": "12.0.14-canary-20260114-d8e19f5",
47
- "@expo/config-plugins": "54.1.0-canary-20260114-d8e19f5",
46
+ "@expo/config": "12.0.14-canary-20260119-70f7c28",
47
+ "@expo/config-plugins": "54.1.0-canary-20260119-70f7c28",
48
48
  "@expo/devcert": "^1.2.1",
49
- "@expo/env": "2.0.9-canary-20260114-d8e19f5",
50
- "@expo/image-utils": "0.8.9-canary-20260114-d8e19f5",
51
- "@expo/json-file": "10.0.9-canary-20260114-d8e19f5",
49
+ "@expo/env": "2.0.9-canary-20260119-70f7c28",
50
+ "@expo/image-utils": "0.8.9-canary-20260119-70f7c28",
51
+ "@expo/json-file": "10.0.9-canary-20260119-70f7c28",
52
52
  "@expo/metro": "~54.2.0",
53
- "@expo/metro-config": "54.1.0-canary-20260114-d8e19f5",
54
- "@expo/osascript": "2.3.9-canary-20260114-d8e19f5",
55
- "@expo/package-manager": "1.9.10-canary-20260114-d8e19f5",
56
- "@expo/plist": "0.4.9-canary-20260114-d8e19f5",
57
- "@expo/prebuild-config": "55.0.0-canary-20260114-d8e19f5",
58
- "@expo/router-server": "0.2.0-canary-20260114-d8e19f5",
59
- "@expo/log-box": "0.0.13-canary-20260114-d8e19f5",
60
- "@expo/schema-utils": "0.1.9-canary-20260114-d8e19f5",
53
+ "@expo/metro-config": "54.1.0-canary-20260119-70f7c28",
54
+ "@expo/osascript": "2.3.9-canary-20260119-70f7c28",
55
+ "@expo/package-manager": "1.9.11-canary-20260119-70f7c28",
56
+ "@expo/plist": "0.4.9-canary-20260119-70f7c28",
57
+ "@expo/prebuild-config": "55.0.0-canary-20260119-70f7c28",
58
+ "@expo/router-server": "0.2.0-canary-20260119-70f7c28",
59
+ "@expo/log-box": "0.0.13-canary-20260119-70f7c28",
60
+ "@expo/schema-utils": "0.1.9-canary-20260119-70f7c28",
61
61
  "@expo/spawn-async": "^1.7.2",
62
62
  "@expo/ws-tunnel": "^1.0.1",
63
63
  "@expo/xcpretty": "^4.3.0",
@@ -74,8 +74,9 @@
74
74
  "compression": "^1.7.4",
75
75
  "connect": "^3.7.0",
76
76
  "debug": "^4.3.4",
77
+ "dnssd-advertise": "^1.0.8",
77
78
  "env-editor": "^0.4.1",
78
- "expo-server": "1.1.0-canary-20260114-d8e19f5",
79
+ "expo-server": "1.1.0-canary-20260119-70f7c28",
79
80
  "freeport-async": "^2.0.0",
80
81
  "getenv": "^2.0.0",
81
82
  "glob": "^13.0.0",
@@ -112,8 +113,8 @@
112
113
  ]
113
114
  },
114
115
  "peerDependencies": {
115
- "expo": "55.0.0-canary-20260114-d8e19f5",
116
- "expo-router": "7.0.0-canary-20260114-d8e19f5",
116
+ "expo": "55.0.0-canary-20260119-70f7c28",
117
+ "expo-router": "7.0.0-canary-20260119-70f7c28",
117
118
  "react-native": "*"
118
119
  },
119
120
  "peerDependenciesMeta": {
@@ -158,7 +159,7 @@
158
159
  "@types/ws": "^8.5.4",
159
160
  "devtools-protocol": "^0.0.1113120",
160
161
  "expo-atlas": "^0.4.1",
161
- "expo-module-scripts": "5.1.0-canary-20260114-d8e19f5",
162
+ "expo-module-scripts": "5.1.0-canary-20260119-70f7c28",
162
163
  "find-process": "^1.4.7",
163
164
  "jest-runner-tsd": "^6.0.0",
164
165
  "klaw-sync": "^6.0.0",
@@ -1,75 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "DataLoaderModuleMiddleware", {
6
- enumerable: true,
7
- get: function() {
8
- return DataLoaderModuleMiddleware;
9
- }
10
- });
11
- function _config() {
12
- const data = require("@expo/config");
13
- _config = function() {
14
- return data;
15
- };
16
- return data;
17
- }
18
- const _ExpoMiddleware = require("./ExpoMiddleware");
19
- const _fetchRouterManifest = require("../metro/fetchRouterManifest");
20
- const LOADER_MODULE_ENDPOINT = '/_expo/loaders';
21
- class DataLoaderModuleMiddleware extends _ExpoMiddleware.ExpoMiddleware {
22
- constructor(projectRoot, appDir, executeServerDataLoaderAsync, getDevServerUrl){
23
- super(projectRoot, [
24
- LOADER_MODULE_ENDPOINT
25
- ]), this.projectRoot = projectRoot, this.appDir = appDir, this.executeServerDataLoaderAsync = executeServerDataLoaderAsync, this.getDevServerUrl = getDevServerUrl;
26
- }
27
- /**
28
- * Only handles a request if `req.pathname` begins with `/_expo/loaders/` and if the request
29
- * headers include `Accept: application/json`.
30
- */ shouldHandleRequest(req) {
31
- var _exp_extra_router, _exp_extra;
32
- if (!req.url) return false;
33
- const { pathname } = new URL(req.url, 'http://localhost');
34
- if (!pathname.startsWith(`${LOADER_MODULE_ENDPOINT}/`)) {
35
- return false;
36
- }
37
- if (req.headers.accept !== 'application/json') {
38
- return false;
39
- }
40
- const { exp } = (0, _config().getConfig)(this.projectRoot);
41
- return !!((_exp_extra = exp.extra) == null ? void 0 : (_exp_extra_router = _exp_extra.router) == null ? void 0 : _exp_extra_router.unstable_useServerDataLoaders);
42
- }
43
- async handleRequestAsync(req, res, next) {
44
- if (![
45
- 'GET',
46
- 'HEAD'
47
- ].includes(req.method ?? '')) {
48
- return next();
49
- }
50
- const manifest = await (0, _fetchRouterManifest.fetchManifest)(this.projectRoot, {
51
- appDir: this.appDir
52
- });
53
- const { pathname } = new URL(req.url, 'http://localhost');
54
- try {
55
- const routePath = pathname.replace('/_expo/loaders', '').replace('/index', '/') || '/';
56
- const matchingRoute = manifest == null ? void 0 : manifest.htmlRoutes.find((route)=>{
57
- return route.namedRegex.test(routePath);
58
- });
59
- if (!matchingRoute) {
60
- throw new Error(`No matching route for ${routePath}`);
61
- }
62
- const loaderData = await this.executeServerDataLoaderAsync(new URL(routePath, this.getDevServerUrl()), matchingRoute);
63
- res.setHeader('Content-Type', 'application/javascript; charset=utf-8');
64
- res.setHeader('Cache-Control', 'no-cache');
65
- res.statusCode = 200;
66
- res.end(JSON.stringify(loaderData ?? {}));
67
- } catch (error) {
68
- console.error(`Failed to generate loader module for ${pathname}:`, error);
69
- res.statusCode = 500;
70
- res.end(`{}`);
71
- }
72
- }
73
- }
74
-
75
- //# sourceMappingURL=DataLoaderModuleMiddleware.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../src/start/server/middleware/DataLoaderModuleMiddleware.ts"],"sourcesContent":["import { getConfig } from '@expo/config';\nimport { type RouteInfo } from 'expo-server/private';\n\nimport { ExpoMiddleware } from './ExpoMiddleware';\nimport { ServerNext, ServerRequest, ServerResponse } from './server.types';\nimport { fetchManifest } from '../metro/fetchRouterManifest';\n\nconst LOADER_MODULE_ENDPOINT = '/_expo/loaders';\n\n/**\n * Middleware for serving loader data modules dynamically during development. This allows\n * client-side navigation to fetch loader data on-demand.\n *\n * In production, these modules are pre-generated as static files.\n */\nexport class DataLoaderModuleMiddleware extends ExpoMiddleware {\n constructor(\n protected projectRoot: string,\n protected appDir: string,\n private executeServerDataLoaderAsync: (url: URL, route: RouteInfo<RegExp>) => Promise<any>,\n private getDevServerUrl: () => string\n ) {\n super(projectRoot, [LOADER_MODULE_ENDPOINT]);\n }\n\n /**\n * Only handles a request if `req.pathname` begins with `/_expo/loaders/` and if the request\n * headers include `Accept: application/json`.\n */\n override shouldHandleRequest(req: ServerRequest): boolean {\n if (!req.url) return false;\n const { pathname } = new URL(req.url, 'http://localhost');\n\n if (!pathname.startsWith(`${LOADER_MODULE_ENDPOINT}/`)) {\n return false;\n }\n\n if (req.headers.accept !== 'application/json') {\n return false;\n }\n\n const { exp } = getConfig(this.projectRoot);\n return !!exp.extra?.router?.unstable_useServerDataLoaders;\n }\n\n async handleRequestAsync(\n req: ServerRequest,\n res: ServerResponse,\n next: ServerNext\n ): Promise<void> {\n if (!['GET', 'HEAD'].includes(req.method ?? '')) {\n return next();\n }\n\n const manifest = await fetchManifest(this.projectRoot, {\n appDir: this.appDir,\n });\n\n const { pathname } = new URL(req.url!, 'http://localhost');\n\n try {\n const routePath = pathname.replace('/_expo/loaders', '').replace('/index', '/') || '/';\n\n const matchingRoute = manifest?.htmlRoutes.find((route) => {\n return route.namedRegex.test(routePath);\n });\n\n if (!matchingRoute) {\n throw new Error(`No matching route for ${routePath}`);\n }\n\n const loaderData = await this.executeServerDataLoaderAsync(\n new URL(routePath, this.getDevServerUrl()),\n matchingRoute\n );\n\n res.setHeader('Content-Type', 'application/javascript; charset=utf-8');\n res.setHeader('Cache-Control', 'no-cache');\n res.statusCode = 200;\n res.end(JSON.stringify(loaderData ?? {}));\n } catch (error) {\n console.error(`Failed to generate loader module for ${pathname}:`, error);\n res.statusCode = 500;\n res.end(`{}`);\n }\n }\n}\n"],"names":["DataLoaderModuleMiddleware","LOADER_MODULE_ENDPOINT","ExpoMiddleware","constructor","projectRoot","appDir","executeServerDataLoaderAsync","getDevServerUrl","shouldHandleRequest","req","exp","url","pathname","URL","startsWith","headers","accept","getConfig","extra","router","unstable_useServerDataLoaders","handleRequestAsync","res","next","includes","method","manifest","fetchManifest","routePath","replace","matchingRoute","htmlRoutes","find","route","namedRegex","test","Error","loaderData","setHeader","statusCode","end","JSON","stringify","error","console"],"mappings":";;;;+BAeaA;;;eAAAA;;;;yBAfa;;;;;;gCAGK;qCAED;AAE9B,MAAMC,yBAAyB;AAQxB,MAAMD,mCAAmCE,8BAAc;IAC5DC,YACE,AAAUC,WAAmB,EAC7B,AAAUC,MAAc,EACxB,AAAQC,4BAAkF,EAC1F,AAAQC,eAA6B,CACrC;QACA,KAAK,CAACH,aAAa;YAACH;SAAuB,QALjCG,cAAAA,kBACAC,SAAAA,aACFC,+BAAAA,mCACAC,kBAAAA;IAGV;IAEA;;;GAGC,GACD,AAASC,oBAAoBC,GAAkB,EAAW;YAa/CC,mBAAAA;QAZT,IAAI,CAACD,IAAIE,GAAG,EAAE,OAAO;QACrB,MAAM,EAAEC,QAAQ,EAAE,GAAG,IAAIC,IAAIJ,IAAIE,GAAG,EAAE;QAEtC,IAAI,CAACC,SAASE,UAAU,CAAC,GAAGb,uBAAuB,CAAC,CAAC,GAAG;YACtD,OAAO;QACT;QAEA,IAAIQ,IAAIM,OAAO,CAACC,MAAM,KAAK,oBAAoB;YAC7C,OAAO;QACT;QAEA,MAAM,EAAEN,GAAG,EAAE,GAAGO,IAAAA,mBAAS,EAAC,IAAI,CAACb,WAAW;QAC1C,OAAO,CAAC,GAACM,aAAAA,IAAIQ,KAAK,sBAATR,oBAAAA,WAAWS,MAAM,qBAAjBT,kBAAmBU,6BAA6B;IAC3D;IAEA,MAAMC,mBACJZ,GAAkB,EAClBa,GAAmB,EACnBC,IAAgB,EACD;QACf,IAAI,CAAC;YAAC;YAAO;SAAO,CAACC,QAAQ,CAACf,IAAIgB,MAAM,IAAI,KAAK;YAC/C,OAAOF;QACT;QAEA,MAAMG,WAAW,MAAMC,IAAAA,kCAAa,EAAC,IAAI,CAACvB,WAAW,EAAE;YACrDC,QAAQ,IAAI,CAACA,MAAM;QACrB;QAEA,MAAM,EAAEO,QAAQ,EAAE,GAAG,IAAIC,IAAIJ,IAAIE,GAAG,EAAG;QAEvC,IAAI;YACF,MAAMiB,YAAYhB,SAASiB,OAAO,CAAC,kBAAkB,IAAIA,OAAO,CAAC,UAAU,QAAQ;YAEnF,MAAMC,gBAAgBJ,4BAAAA,SAAUK,UAAU,CAACC,IAAI,CAAC,CAACC;gBAC/C,OAAOA,MAAMC,UAAU,CAACC,IAAI,CAACP;YAC/B;YAEA,IAAI,CAACE,eAAe;gBAClB,MAAM,IAAIM,MAAM,CAAC,sBAAsB,EAAER,WAAW;YACtD;YAEA,MAAMS,aAAa,MAAM,IAAI,CAAC/B,4BAA4B,CACxD,IAAIO,IAAIe,WAAW,IAAI,CAACrB,eAAe,KACvCuB;YAGFR,IAAIgB,SAAS,CAAC,gBAAgB;YAC9BhB,IAAIgB,SAAS,CAAC,iBAAiB;YAC/BhB,IAAIiB,UAAU,GAAG;YACjBjB,IAAIkB,GAAG,CAACC,KAAKC,SAAS,CAACL,cAAc,CAAC;QACxC,EAAE,OAAOM,OAAO;YACdC,QAAQD,KAAK,CAAC,CAAC,qCAAqC,EAAE/B,SAAS,CAAC,CAAC,EAAE+B;YACnErB,IAAIiB,UAAU,GAAG;YACjBjB,IAAIkB,GAAG,CAAC,CAAC,EAAE,CAAC;QACd;IACF;AACF"}