@expo/cli 0.22.14 → 0.22.16
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
|
@@ -134,6 +134,8 @@ function getTunnelSession() {
|
|
|
134
134
|
const leaseFile = _nodePath().join(_tempDir().default, `_ws_tunnel_lease_${leaseId}`);
|
|
135
135
|
try {
|
|
136
136
|
session = _nodeFs().readFileSync(leaseFile, "utf8").trim() || session;
|
|
137
|
+
} catch {}
|
|
138
|
+
try {
|
|
137
139
|
_nodeFs().writeFileSync(leaseFile, session, "utf8");
|
|
138
140
|
} catch {}
|
|
139
141
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/start/server/AsyncWsTunnel.ts"],"sourcesContent":["import * as tunnel from '@expo/ws-tunnel';\nimport chalk from 'chalk';\nimport * as fs from 'node:fs';\nimport { hostname } from 'node:os';\nimport * as path from 'node:path';\nimport tempDir from 'temp-dir';\n\nimport * as Log from '../../log';\nimport { env, envIsWebcontainer } from '../../utils/env';\nimport { CommandError } from '../../utils/errors';\n\nconst debug = require('debug')('expo:start:server:ws-tunnel') as typeof console.log;\n\nexport class AsyncWsTunnel {\n /** Info about the currently running instance of tunnel. */\n private serverUrl: string | null = null;\n\n constructor(_projectRoot: string, port: number) {\n if (port !== 8081) {\n throw new CommandError(\n 'WS_TUNNEL_PORT',\n `WS-tunnel only supports tunneling over port 8081, attempted to use port ${port}`\n );\n }\n }\n\n public getActiveUrl(): string | null {\n return this.serverUrl;\n }\n\n async startAsync(): Promise<void> {\n this.serverUrl = await tunnel.startAsync({\n ...getTunnelOptions(),\n onStatusChange(status) {\n if (status === 'disconnected') {\n Log.error(\n chalk.red(\n 'Tunnel connection has been closed. This is often related to intermittent connection problems with the ws proxy servers. Restart the dev server to try connecting again.'\n ) + chalk.gray('\\nCheck the Expo status page for outages: https://status.expo.dev/')\n );\n }\n },\n });\n\n debug('Tunnel URL:', this.serverUrl);\n }\n\n async stopAsync(): Promise<void> {\n debug('Stopping Tunnel');\n await tunnel.stopAsync();\n this.serverUrl = null;\n }\n}\n\n// Generate a base-36 string of 5 characters (from 32 bits of randomness)\nfunction randomStr() {\n return (Math.random().toString(36) + '00000').slice(2, 7);\n}\n\nfunction getTunnelSession(): string {\n let session = randomStr() + randomStr() + randomStr();\n if (envIsWebcontainer()) {\n const leaseId = Buffer.from(hostname()).toString('base64url');\n const leaseFile = path.join(tempDir, `_ws_tunnel_lease_${leaseId}`);\n try {\n session = fs.readFileSync(leaseFile, 'utf8').trim() || session;\n fs.writeFileSync(leaseFile, session, 'utf8');\n } catch {}\n }\n return session;\n}\n\nfunction getTunnelOptions() {\n const userDefinedSubdomain = env.EXPO_TUNNEL_SUBDOMAIN;\n if (userDefinedSubdomain && typeof userDefinedSubdomain === 'string') {\n debug('Session:', userDefinedSubdomain);\n return { session: userDefinedSubdomain };\n } else {\n const session = getTunnelSession();\n return { session };\n }\n}\n"],"names":["AsyncWsTunnel","debug","require","serverUrl","constructor","_projectRoot","port","CommandError","getActiveUrl","startAsync","tunnel","getTunnelOptions","onStatusChange","status","Log","error","chalk","red","gray","stopAsync","randomStr","Math","random","toString","slice","getTunnelSession","session","envIsWebcontainer","leaseId","Buffer","from","hostname","leaseFile","path","join","tempDir","fs","readFileSync","trim","writeFileSync","userDefinedSubdomain","env","EXPO_TUNNEL_SUBDOMAIN"],"mappings":"AAAA;;;;+BAaaA,eAAa;;aAAbA,aAAa;;;+DAbF,iBAAiB;;;;;;;8DACvB,OAAO;;;;;;;+DACL,SAAS;;;;;;;yBACJ,SAAS;;;;;;;+DACZ,WAAW;;;;;;;8DACb,UAAU;;;;;;2DAET,WAAW;qBACO,iBAAiB;wBAC3B,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjD,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,6BAA6B,CAAC,AAAsB,AAAC;AAE7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,EAAE,AAAC;IACtD,IAAIO,IAAAA,IAAiB,kBAAA,GAAE,EAAE;QACvB,MAAMC,OAAO,GAAGC,MAAM,CAACC,IAAI,CAACC,IAAAA,OAAQ,EAAA,SAAA,GAAE,CAAC,CAACR,QAAQ,CAAC,WAAW,CAAC,AAAC;QAC9D,MAAMS,SAAS,GAAGC,SAAI,EAAA,CAACC,IAAI,CAACC,QAAO,EAAA,QAAA,EAAE,CAAC,iBAAiB,EAAEP,OAAO,CAAC,CAAC,CAAC,AAAC;QACpE,IAAI;YACFF,OAAO,GAAGU,OAAE,EAAA,CAACC,YAAY,CAACL,SAAS,EAAE,MAAM,CAAC,CAACM,IAAI,EAAE,IAAIZ,OAAO,CAAC;
|
|
1
|
+
{"version":3,"sources":["../../../../src/start/server/AsyncWsTunnel.ts"],"sourcesContent":["import * as tunnel from '@expo/ws-tunnel';\nimport chalk from 'chalk';\nimport * as fs from 'node:fs';\nimport { hostname } from 'node:os';\nimport * as path from 'node:path';\nimport tempDir from 'temp-dir';\n\nimport * as Log from '../../log';\nimport { env, envIsWebcontainer } from '../../utils/env';\nimport { CommandError } from '../../utils/errors';\n\nconst debug = require('debug')('expo:start:server:ws-tunnel') as typeof console.log;\n\nexport class AsyncWsTunnel {\n /** Info about the currently running instance of tunnel. */\n private serverUrl: string | null = null;\n\n constructor(_projectRoot: string, port: number) {\n if (port !== 8081) {\n throw new CommandError(\n 'WS_TUNNEL_PORT',\n `WS-tunnel only supports tunneling over port 8081, attempted to use port ${port}`\n );\n }\n }\n\n public getActiveUrl(): string | null {\n return this.serverUrl;\n }\n\n async startAsync(): Promise<void> {\n this.serverUrl = await tunnel.startAsync({\n ...getTunnelOptions(),\n onStatusChange(status) {\n if (status === 'disconnected') {\n Log.error(\n chalk.red(\n 'Tunnel connection has been closed. This is often related to intermittent connection problems with the ws proxy servers. Restart the dev server to try connecting again.'\n ) + chalk.gray('\\nCheck the Expo status page for outages: https://status.expo.dev/')\n );\n }\n },\n });\n\n debug('Tunnel URL:', this.serverUrl);\n }\n\n async stopAsync(): Promise<void> {\n debug('Stopping Tunnel');\n await tunnel.stopAsync();\n this.serverUrl = null;\n }\n}\n\n// Generate a base-36 string of 5 characters (from 32 bits of randomness)\nfunction randomStr() {\n return (Math.random().toString(36) + '00000').slice(2, 7);\n}\n\nfunction getTunnelSession(): string {\n let session = randomStr() + randomStr() + randomStr();\n if (envIsWebcontainer()) {\n const leaseId = Buffer.from(hostname()).toString('base64url');\n const leaseFile = path.join(tempDir, `_ws_tunnel_lease_${leaseId}`);\n try {\n session = fs.readFileSync(leaseFile, 'utf8').trim() || session;\n } catch {}\n try {\n fs.writeFileSync(leaseFile, session, 'utf8');\n } catch {}\n }\n return session;\n}\n\nfunction getTunnelOptions() {\n const userDefinedSubdomain = env.EXPO_TUNNEL_SUBDOMAIN;\n if (userDefinedSubdomain && typeof userDefinedSubdomain === 'string') {\n debug('Session:', userDefinedSubdomain);\n return { session: userDefinedSubdomain };\n } else {\n const session = getTunnelSession();\n return { session };\n }\n}\n"],"names":["AsyncWsTunnel","debug","require","serverUrl","constructor","_projectRoot","port","CommandError","getActiveUrl","startAsync","tunnel","getTunnelOptions","onStatusChange","status","Log","error","chalk","red","gray","stopAsync","randomStr","Math","random","toString","slice","getTunnelSession","session","envIsWebcontainer","leaseId","Buffer","from","hostname","leaseFile","path","join","tempDir","fs","readFileSync","trim","writeFileSync","userDefinedSubdomain","env","EXPO_TUNNEL_SUBDOMAIN"],"mappings":"AAAA;;;;+BAaaA,eAAa;;aAAbA,aAAa;;;+DAbF,iBAAiB;;;;;;;8DACvB,OAAO;;;;;;;+DACL,SAAS;;;;;;;yBACJ,SAAS;;;;;;;+DACZ,WAAW;;;;;;;8DACb,UAAU;;;;;;2DAET,WAAW;qBACO,iBAAiB;wBAC3B,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjD,MAAMC,KAAK,GAAGC,OAAO,CAAC,OAAO,CAAC,CAAC,6BAA6B,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SAAS,EAAE,GAAGA,SAAS,EAAE,AAAC;IACtD,IAAIO,IAAAA,IAAiB,kBAAA,GAAE,EAAE;QACvB,MAAMC,OAAO,GAAGC,MAAM,CAACC,IAAI,CAACC,IAAAA,OAAQ,EAAA,SAAA,GAAE,CAAC,CAACR,QAAQ,CAAC,WAAW,CAAC,AAAC;QAC9D,MAAMS,SAAS,GAAGC,SAAI,EAAA,CAACC,IAAI,CAACC,QAAO,EAAA,QAAA,EAAE,CAAC,iBAAiB,EAAEP,OAAO,CAAC,CAAC,CAAC,AAAC;QACpE,IAAI;YACFF,OAAO,GAAGU,OAAE,EAAA,CAACC,YAAY,CAACL,SAAS,EAAE,MAAM,CAAC,CAACM,IAAI,EAAE,IAAIZ,OAAO,CAAC;QACjE,EAAE,OAAM,CAAC,CAAC;QACV,IAAI;YACFU,OAAE,EAAA,CAACG,aAAa,CAACP,SAAS,EAAEN,OAAO,EAAE,MAAM,CAAC,CAAC;QAC/C,EAAE,OAAM,CAAC,CAAC;IACZ,CAAC;IACD,OAAOA,OAAO,CAAC;AACjB,CAAC;AAED,SAASf,gBAAgB,GAAG;IAC1B,MAAM6B,oBAAoB,GAAGC,IAAG,IAAA,CAACC,qBAAqB,AAAC;IACvD,IAAIF,oBAAoB,IAAI,OAAOA,oBAAoB,KAAK,QAAQ,EAAE;QACpEvC,KAAK,CAAC,UAAU,EAAEuC,oBAAoB,CAAC,CAAC;QACxC,OAAO;YAAEd,OAAO,EAAEc,oBAAoB;SAAE,CAAC;IAC3C,OAAO;QACL,MAAMd,OAAO,GAAGD,gBAAgB,EAAE,AAAC;QACnC,OAAO;YAAEC,OAAO;SAAE,CAAC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -31,7 +31,7 @@ class FetchClient {
|
|
|
31
31
|
this.headers = {
|
|
32
32
|
accept: "application/json",
|
|
33
33
|
"content-type": "application/json",
|
|
34
|
-
"user-agent": `expo-cli/${"0.22.
|
|
34
|
+
"user-agent": `expo-cli/${"0.22.16"}`,
|
|
35
35
|
authorization: "Basic " + _nodeBuffer().Buffer.from(`${target}:`).toString("base64")
|
|
36
36
|
};
|
|
37
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/cli",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.16",
|
|
4
4
|
"description": "The Expo CLI",
|
|
5
5
|
"main": "build/bin/cli",
|
|
6
6
|
"bin": {
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"@0no-co/graphql.web": "^1.0.8",
|
|
43
43
|
"@babel/runtime": "^7.20.0",
|
|
44
44
|
"@expo/code-signing-certificates": "^0.0.5",
|
|
45
|
-
"@expo/config": "~10.0.
|
|
45
|
+
"@expo/config": "~10.0.10",
|
|
46
46
|
"@expo/config-plugins": "~9.0.15",
|
|
47
47
|
"@expo/devcert": "^1.1.2",
|
|
48
|
-
"@expo/env": "~0.4.
|
|
49
|
-
"@expo/image-utils": "^0.6.
|
|
50
|
-
"@expo/json-file": "^9.0.
|
|
51
|
-
"@expo/metro-config": "~0.19.
|
|
52
|
-
"@expo/osascript": "^2.1.
|
|
53
|
-
"@expo/package-manager": "^1.7.
|
|
54
|
-
"@expo/plist": "^0.2.
|
|
55
|
-
"@expo/prebuild-config": "^8.0.
|
|
48
|
+
"@expo/env": "~0.4.2",
|
|
49
|
+
"@expo/image-utils": "^0.6.5",
|
|
50
|
+
"@expo/json-file": "^9.0.2",
|
|
51
|
+
"@expo/metro-config": "~0.19.10",
|
|
52
|
+
"@expo/osascript": "^2.1.6",
|
|
53
|
+
"@expo/package-manager": "^1.7.2",
|
|
54
|
+
"@expo/plist": "^0.2.2",
|
|
55
|
+
"@expo/prebuild-config": "^8.0.27",
|
|
56
56
|
"@expo/rudder-sdk-node": "^1.1.1",
|
|
57
57
|
"@expo/spawn-async": "^1.7.2",
|
|
58
58
|
"@expo/ws-tunnel": "^1.0.1",
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"@types/ws": "^8.5.4",
|
|
156
156
|
"devtools-protocol": "^0.0.1113120",
|
|
157
157
|
"expo-atlas": "^0.4.0",
|
|
158
|
-
"expo-module-scripts": "^4.0.
|
|
158
|
+
"expo-module-scripts": "^4.0.4",
|
|
159
159
|
"find-process": "^1.4.7",
|
|
160
160
|
"jest-runner-tsd": "^6.0.0",
|
|
161
161
|
"klaw-sync": "^6.0.0",
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
"tree-kill": "^1.2.2",
|
|
169
169
|
"tsd": "^0.28.1"
|
|
170
170
|
},
|
|
171
|
-
"gitHead": "
|
|
171
|
+
"gitHead": "13972cd80b8b652a2ca6a2c45e03f7a0b3915ce1"
|
|
172
172
|
}
|