@expo/cli 0.10.10 → 0.11.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 +2 -2
- package/build/src/api/endpoint.js +10 -0
- package/build/src/api/endpoint.js.map +1 -1
- package/build/src/api/graphql/queries/UserQuery.js +2 -1
- package/build/src/api/graphql/queries/UserQuery.js.map +1 -1
- package/build/src/api/user/UserSettings.js.map +1 -1
- package/build/src/api/user/actions.js +6 -1
- package/build/src/api/user/actions.js.map +1 -1
- package/build/src/api/user/expoSsoLauncher.js +127 -0
- package/build/src/api/user/expoSsoLauncher.js.map +1 -0
- package/build/src/api/user/user.js +46 -18
- package/build/src/api/user/user.js.map +1 -1
- package/build/src/export/index.js +3 -1
- package/build/src/export/index.js.map +1 -1
- package/build/src/export/resolveOptions.js +28 -29
- package/build/src/export/resolveOptions.js.map +1 -1
- package/build/src/graphql/generated.js +25 -1
- package/build/src/graphql/generated.js.map +1 -1
- package/build/src/login/index.js +7 -2
- package/build/src/login/index.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +35 -3
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/MetroTerminalReporter.js +9 -1
- package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/metroWatchTypeScriptFiles.js +1 -1
- package/build/src/start/server/metro/metroWatchTypeScriptFiles.js.map +1 -1
- package/build/src/start/server/metro/withMetroMultiPlatform.js +2 -2
- package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
- package/build/src/start/server/metro/withMetroResolvers.js +166 -16
- package/build/src/start/server/metro/withMetroResolvers.js.map +1 -1
- package/build/src/start/server/middleware/ClassicManifestMiddleware.js +1 -1
- package/build/src/start/server/middleware/ManifestMiddleware.js +23 -6
- package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
- package/build/src/start/server/type-generation/__typetests__/fixtures/basic.js.map +1 -1
- package/build/src/start/server/type-generation/__typetests__/route.test.js +20 -9
- package/build/src/start/server/type-generation/__typetests__/route.test.js.map +1 -1
- package/build/src/start/server/type-generation/routes.js +120 -50
- package/build/src/start/server/type-generation/routes.js.map +1 -1
- package/build/src/utils/analytics/metroDebuggerMiddleware.js +9 -4
- package/build/src/utils/analytics/metroDebuggerMiddleware.js.map +1 -1
- package/build/src/utils/analytics/rudderstackClient.js +2 -2
- package/build/src/utils/env.js +3 -0
- package/build/src/utils/env.js.map +1 -1
- package/build/src/utils/port.js +2 -0
- package/build/src/utils/port.js.map +1 -1
- package/package.json +8 -8
- package/static/react-devtools-page/index.html +1 -1
package/build/bin/cli
CHANGED
|
@@ -132,7 +132,7 @@ const args = (0, _arg).default({
|
|
|
132
132
|
});
|
|
133
133
|
if (args["--version"]) {
|
|
134
134
|
// Version is added in the build script.
|
|
135
|
-
console.log("0.
|
|
135
|
+
console.log("0.11.0");
|
|
136
136
|
process.exit(0);
|
|
137
137
|
}
|
|
138
138
|
if (args["--non-interactive"]) {
|
|
@@ -262,7 +262,7 @@ commands[command]().then((exec)=>{
|
|
|
262
262
|
logEventAsync("action", {
|
|
263
263
|
action: `expo ${command}`,
|
|
264
264
|
source: "expo/cli",
|
|
265
|
-
source_version: "0.
|
|
265
|
+
source_version: "0.11.0"
|
|
266
266
|
});
|
|
267
267
|
});
|
|
268
268
|
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
5
|
exports.getExpoApiBaseUrl = getExpoApiBaseUrl;
|
|
6
|
+
exports.getExpoWebsiteBaseUrl = getExpoWebsiteBaseUrl;
|
|
6
7
|
var _env = require("../utils/env");
|
|
7
8
|
function getExpoApiBaseUrl() {
|
|
8
9
|
if (_env.env.EXPO_STAGING) {
|
|
@@ -13,5 +14,14 @@ function getExpoApiBaseUrl() {
|
|
|
13
14
|
return `https://api.expo.dev`;
|
|
14
15
|
}
|
|
15
16
|
}
|
|
17
|
+
function getExpoWebsiteBaseUrl() {
|
|
18
|
+
if (_env.env.EXPO_STAGING) {
|
|
19
|
+
return `https://staging.expo.dev`;
|
|
20
|
+
} else if (_env.env.EXPO_LOCAL) {
|
|
21
|
+
return `http://127.0.0.1:3001`;
|
|
22
|
+
} else {
|
|
23
|
+
return `https://expo.dev`;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
16
26
|
|
|
17
27
|
//# sourceMappingURL=endpoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/api/endpoint.ts"],"sourcesContent":["import { env } from '../utils/env';\n\n/** Get the URL for the expo.dev API. */\nexport function getExpoApiBaseUrl(): string {\n if (env.EXPO_STAGING) {\n return `https://staging-api.expo.dev`;\n } else if (env.EXPO_LOCAL) {\n return `http://127.0.0.1:3000`;\n } else {\n return `https://api.expo.dev`;\n }\n}\n"],"names":["getExpoApiBaseUrl","env","EXPO_STAGING","EXPO_LOCAL"],"mappings":"AAAA;;;;QAGgBA,iBAAiB,GAAjBA,iBAAiB;
|
|
1
|
+
{"version":3,"sources":["../../../src/api/endpoint.ts"],"sourcesContent":["import { env } from '../utils/env';\n\n/** Get the URL for the expo.dev API. */\nexport function getExpoApiBaseUrl(): string {\n if (env.EXPO_STAGING) {\n return `https://staging-api.expo.dev`;\n } else if (env.EXPO_LOCAL) {\n return `http://127.0.0.1:3000`;\n } else {\n return `https://api.expo.dev`;\n }\n}\n\n/** Get the URL for the expo.dev website. */\nexport function getExpoWebsiteBaseUrl(): string {\n if (env.EXPO_STAGING) {\n return `https://staging.expo.dev`;\n } else if (env.EXPO_LOCAL) {\n return `http://127.0.0.1:3001`;\n } else {\n return `https://expo.dev`;\n }\n}\n"],"names":["getExpoApiBaseUrl","getExpoWebsiteBaseUrl","env","EXPO_STAGING","EXPO_LOCAL"],"mappings":"AAAA;;;;QAGgBA,iBAAiB,GAAjBA,iBAAiB;QAWjBC,qBAAqB,GAArBA,qBAAqB;AAdjB,IAAA,IAAc,WAAd,cAAc,CAAA;AAG3B,SAASD,iBAAiB,GAAW;IAC1C,IAAIE,IAAG,IAAA,CAACC,YAAY,EAAE;QACpB,OAAO,CAAC,4BAA4B,CAAC,CAAC;KACvC,MAAM,IAAID,IAAG,IAAA,CAACE,UAAU,EAAE;QACzB,OAAO,CAAC,qBAAqB,CAAC,CAAC;KAChC,MAAM;QACL,OAAO,CAAC,oBAAoB,CAAC,CAAC;KAC/B;CACF;AAGM,SAASH,qBAAqB,GAAW;IAC9C,IAAIC,IAAG,IAAA,CAACC,YAAY,EAAE;QACpB,OAAO,CAAC,wBAAwB,CAAC,CAAC;KACnC,MAAM,IAAID,IAAG,IAAA,CAACE,UAAU,EAAE;QACzB,OAAO,CAAC,qBAAqB,CAAC,CAAC;KAChC,MAAM;QACL,OAAO,CAAC,gBAAgB,CAAC,CAAC;KAC3B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/api/graphql/queries/UserQuery.ts"],"sourcesContent":["import gql from 'graphql-tag';\n\nimport { CurrentUserQuery } from '../../../graphql/generated';\nimport { graphqlClient, withErrorHandlingAsync } from '../client';\n\nexport const UserQuery = {\n async currentUserAsync(): Promise<CurrentUserQuery['meActor']> {\n const data = await withErrorHandlingAsync(\n graphqlClient\n .query<CurrentUserQuery>(\n gql`\n query CurrentUser {\n meActor {\n __typename\n id\n ... on UserActor {\n primaryAccount {\n id\n }\n username\n }\n ... on Robot {\n firstName\n }\n accounts {\n id\n users {\n actor {\n id\n }\n permissions\n }\n }\n }\n }\n `,\n /* variables */ undefined,\n {\n additionalTypenames: ['User'],\n }\n )\n .toPromise()\n );\n\n return data.meActor;\n },\n};\n"],"names":["UserQuery","currentUserAsync","data","withErrorHandlingAsync","graphqlClient","query","gql","undefined","additionalTypenames","toPromise","meActor"],"mappings":"AAAA;;;;;AAAgB,IAAA,WAAa,kCAAb,aAAa,EAAA;AAGyB,IAAA,OAAW,WAAX,WAAW,CAAA;;;;;;AAE1D,MAAMA,SAAS,GAAG;IACvB,MAAMC,gBAAgB,IAAyC;QAC7D,MAAMC,IAAI,GAAG,MAAMC,CAAAA,GAAAA,OAAsB,AAmCxC,CAAA,uBAnCwC,CACvCC,OAAa,cAAA,CACVC,KAAK,CACJC,WAAG,QAAA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;UAyBJ,CAAC,EACD,eAAe,CAACC,SAAS,EACzB;YACEC,mBAAmB,EAAE;gBAAC,MAAM;aAAC;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/api/graphql/queries/UserQuery.ts"],"sourcesContent":["import gql from 'graphql-tag';\n\nimport { CurrentUserQuery } from '../../../graphql/generated';\nimport { graphqlClient, withErrorHandlingAsync } from '../client';\n\nexport const UserQuery = {\n async currentUserAsync(): Promise<CurrentUserQuery['meActor']> {\n const data = await withErrorHandlingAsync(\n graphqlClient\n .query<CurrentUserQuery>(\n gql`\n query CurrentUser {\n meActor {\n __typename\n id\n ... on UserActor {\n primaryAccount {\n id\n }\n username\n }\n ... on Robot {\n firstName\n }\n accounts {\n id\n users {\n actor {\n id\n }\n permissions\n }\n }\n }\n }\n `,\n /* variables */ undefined,\n {\n additionalTypenames: ['User', 'SSOUser'],\n }\n )\n .toPromise()\n );\n\n return data.meActor;\n },\n};\n"],"names":["UserQuery","currentUserAsync","data","withErrorHandlingAsync","graphqlClient","query","gql","undefined","additionalTypenames","toPromise","meActor"],"mappings":"AAAA;;;;;AAAgB,IAAA,WAAa,kCAAb,aAAa,EAAA;AAGyB,IAAA,OAAW,WAAX,WAAW,CAAA;;;;;;AAE1D,MAAMA,SAAS,GAAG;IACvB,MAAMC,gBAAgB,IAAyC;QAC7D,MAAMC,IAAI,GAAG,MAAMC,CAAAA,GAAAA,OAAsB,AAmCxC,CAAA,uBAnCwC,CACvCC,OAAa,cAAA,CACVC,KAAK,CACJC,WAAG,QAAA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;UAyBJ,CAAC,EACD,eAAe,CAACC,SAAS,EACzB;YACEC,mBAAmB,EAAE;gBAAC,MAAM;gBAAE,SAAS;aAAC;SACzC,CACF,CACAC,SAAS,EAAE,CACf,AAAC;QAEF,OAAOP,IAAI,CAACQ,OAAO,CAAC;KACrB;CACF,AAAC;QAzCWV,SAAS,GAATA,SAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/api/user/UserSettings.ts"],"sourcesContent":["import { getExpoHomeDirectory, getUserStatePath } from '@expo/config/build/getUserState';\nimport JsonFile from '@expo/json-file';\nimport crypto from 'crypto';\n\ntype SessionData = {\n sessionSecret: string;\n // These fields are potentially used by Expo CLI.\n userId: string;\n username: string;\n currentConnection: 'Username-Password-Authentication';\n};\n\nexport type UserSettingsData = {\n auth?: SessionData | null;\n ignoreBundledBinaries?: string[];\n PATH?: string;\n /** Last development code signing ID used for `npx expo run:ios`. */\n developmentCodeSigningId?: string;\n /** Unique user ID which is generated anonymously and can be cleared locally. */\n uuid?: string;\n};\n\n/** Return the user cache directory. */\nfunction getDirectory() {\n return getExpoHomeDirectory();\n}\n\nfunction getFilePath(): string {\n return getUserStatePath();\n}\n\nfunction userSettingsJsonFile(): JsonFile<UserSettingsData> {\n return new JsonFile<UserSettingsData>(getFilePath(), {\n ensureDir: true,\n jsonParseErrorDefault: {},\n cantReadFileDefault: {},\n });\n}\n\nasync function setSessionAsync(sessionData?: SessionData): Promise<void> {\n await UserSettings.setAsync('auth', sessionData, {\n default: {},\n ensureDir: true,\n });\n}\n\nfunction getSession(): SessionData | null {\n try {\n return JsonFile.read<UserSettingsData>(getUserStatePath())?.auth ?? null;\n } catch (error: any) {\n if (error.code === 'ENOENT') {\n return null;\n }\n throw error;\n }\n}\n\nfunction getAccessToken(): string | null {\n return process.env.EXPO_TOKEN ?? null;\n}\n\n// returns an anonymous, unique identifier for a user on the current computer\nasync function getAnonymousIdentifierAsync(): Promise<string> {\n const settings = await userSettingsJsonFile();\n let id = await settings.getAsync('uuid', null);\n\n if (!id) {\n id = crypto.randomUUID();\n await settings.setAsync('uuid', id);\n }\n\n return id;\n}\n\nconst UserSettings = Object.assign(userSettingsJsonFile(), {\n getSession,\n setSessionAsync,\n getAccessToken,\n getDirectory,\n getFilePath,\n userSettingsJsonFile,\n getAnonymousIdentifierAsync,\n});\n\nexport default UserSettings;\n"],"names":["getDirectory","getExpoHomeDirectory","getFilePath","getUserStatePath","userSettingsJsonFile","JsonFile","ensureDir","jsonParseErrorDefault","cantReadFileDefault","setSessionAsync","sessionData","UserSettings","setAsync","default","getSession","read","auth","error","code","getAccessToken","process","env","EXPO_TOKEN","getAnonymousIdentifierAsync","settings","id","getAsync","crypto","randomUUID","Object","assign"],"mappings":"AAAA;;;;;AAAuD,IAAA,aAAiC,WAAjC,iCAAiC,CAAA;AACnE,IAAA,SAAiB,kCAAjB,iBAAiB,EAAA;AACnB,IAAA,OAAQ,kCAAR,QAAQ,EAAA;;;;;;AAoB3B,uCAAuC,CACvC,SAASA,YAAY,GAAG;IACtB,OAAOC,CAAAA,GAAAA,aAAoB,AAAE,CAAA,qBAAF,EAAE,CAAC;CAC/B;AAED,SAASC,WAAW,GAAW;IAC7B,OAAOC,CAAAA,GAAAA,aAAgB,AAAE,CAAA,iBAAF,EAAE,CAAC;CAC3B;AAED,SAASC,oBAAoB,GAA+B;IAC1D,OAAO,IAAIC,SAAQ,QAAA,CAAmBH,WAAW,EAAE,EAAE;QACnDI,SAAS,EAAE,IAAI;QACfC,qBAAqB,EAAE,EAAE;QACzBC,mBAAmB,EAAE,EAAE;KACxB,CAAC,CAAC;CACJ;AAED,eAAeC,eAAe,CAACC,WAAyB,EAAiB;IACvE,MAAMC,YAAY,CAACC,QAAQ,CAAC,MAAM,EAAEF,WAAW,EAAE;QAC/CG,OAAO,EAAE,EAAE;QACXP,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;CACJ;AAED,SAASQ,UAAU,GAAuB;IACxC,IAAI;YACKT,GAAmD;YAAnDA,IAAyD;QAAhE,OAAOA,CAAAA,IAAyD,GAAzDA,CAAAA,GAAmD,GAAnDA,SAAQ,QAAA,CAACU,IAAI,CAAmBZ,CAAAA,GAAAA,aAAgB,AAAE,CAAA,iBAAF,EAAE,CAAC,SAAM,GAAzDE,KAAAA,CAAyD,GAAzDA,GAAmD,CAAEW,IAAI,YAAzDX,IAAyD,GAAI,IAAI,CAAC;KAC1E,CAAC,OAAOY,KAAK,EAAO;QACnB,IAAIA,KAAK,CAACC,IAAI,KAAK,QAAQ,EAAE;YAC3B,OAAO,IAAI,CAAC;SACb;QACD,MAAMD,KAAK,CAAC;KACb;CACF;AAED,SAASE,cAAc,GAAkB;QAChCC,WAAsB;IAA7B,OAAOA,CAAAA,WAAsB,GAAtBA,OAAO,CAACC,GAAG,CAACC,UAAU,YAAtBF,WAAsB,GAAI,IAAI,CAAC;CACvC;AAED,6EAA6E;AAC7E,eAAeG,2BAA2B,GAAoB;IAC5D,MAAMC,QAAQ,GAAG,MAAMpB,oBAAoB,EAAE,AAAC;IAC9C,IAAIqB,EAAE,GAAG,MAAMD,QAAQ,CAACE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,AAAC;IAE/C,IAAI,CAACD,EAAE,EAAE;QACPA,EAAE,GAAGE,OAAM,QAAA,CAACC,UAAU,EAAE,CAAC;QACzB,MAAMJ,QAAQ,CAACZ,QAAQ,CAAC,MAAM,EAAEa,EAAE,CAAC,CAAC;KACrC;IAED,OAAOA,EAAE,CAAC;CACX;AAED,MAAMd,YAAY,GAAGkB,MAAM,CAACC,MAAM,CAAC1B,oBAAoB,EAAE,EAAE;IACzDU,UAAU;IACVL,eAAe;IACfU,cAAc;IACdnB,YAAY;IACZE,WAAW;IACXE,oBAAoB;IACpBmB,2BAA2B;CAC5B,CAAC,AAAC;eAEYZ,YAAY"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/api/user/UserSettings.ts"],"sourcesContent":["import { getExpoHomeDirectory, getUserStatePath } from '@expo/config/build/getUserState';\nimport JsonFile from '@expo/json-file';\nimport crypto from 'crypto';\n\ntype SessionData = {\n sessionSecret: string;\n // These fields are potentially used by Expo CLI.\n userId: string;\n username: string;\n currentConnection: 'Username-Password-Authentication' | 'Browser-Flow-Authentication';\n};\n\nexport type UserSettingsData = {\n auth?: SessionData | null;\n ignoreBundledBinaries?: string[];\n PATH?: string;\n /** Last development code signing ID used for `npx expo run:ios`. */\n developmentCodeSigningId?: string;\n /** Unique user ID which is generated anonymously and can be cleared locally. */\n uuid?: string;\n};\n\n/** Return the user cache directory. */\nfunction getDirectory() {\n return getExpoHomeDirectory();\n}\n\nfunction getFilePath(): string {\n return getUserStatePath();\n}\n\nfunction userSettingsJsonFile(): JsonFile<UserSettingsData> {\n return new JsonFile<UserSettingsData>(getFilePath(), {\n ensureDir: true,\n jsonParseErrorDefault: {},\n cantReadFileDefault: {},\n });\n}\n\nasync function setSessionAsync(sessionData?: SessionData): Promise<void> {\n await UserSettings.setAsync('auth', sessionData, {\n default: {},\n ensureDir: true,\n });\n}\n\nfunction getSession(): SessionData | null {\n try {\n return JsonFile.read<UserSettingsData>(getUserStatePath())?.auth ?? null;\n } catch (error: any) {\n if (error.code === 'ENOENT') {\n return null;\n }\n throw error;\n }\n}\n\nfunction getAccessToken(): string | null {\n return process.env.EXPO_TOKEN ?? null;\n}\n\n// returns an anonymous, unique identifier for a user on the current computer\nasync function getAnonymousIdentifierAsync(): Promise<string> {\n const settings = await userSettingsJsonFile();\n let id = await settings.getAsync('uuid', null);\n\n if (!id) {\n id = crypto.randomUUID();\n await settings.setAsync('uuid', id);\n }\n\n return id;\n}\n\nconst UserSettings = Object.assign(userSettingsJsonFile(), {\n getSession,\n setSessionAsync,\n getAccessToken,\n getDirectory,\n getFilePath,\n userSettingsJsonFile,\n getAnonymousIdentifierAsync,\n});\n\nexport default UserSettings;\n"],"names":["getDirectory","getExpoHomeDirectory","getFilePath","getUserStatePath","userSettingsJsonFile","JsonFile","ensureDir","jsonParseErrorDefault","cantReadFileDefault","setSessionAsync","sessionData","UserSettings","setAsync","default","getSession","read","auth","error","code","getAccessToken","process","env","EXPO_TOKEN","getAnonymousIdentifierAsync","settings","id","getAsync","crypto","randomUUID","Object","assign"],"mappings":"AAAA;;;;;AAAuD,IAAA,aAAiC,WAAjC,iCAAiC,CAAA;AACnE,IAAA,SAAiB,kCAAjB,iBAAiB,EAAA;AACnB,IAAA,OAAQ,kCAAR,QAAQ,EAAA;;;;;;AAoB3B,uCAAuC,CACvC,SAASA,YAAY,GAAG;IACtB,OAAOC,CAAAA,GAAAA,aAAoB,AAAE,CAAA,qBAAF,EAAE,CAAC;CAC/B;AAED,SAASC,WAAW,GAAW;IAC7B,OAAOC,CAAAA,GAAAA,aAAgB,AAAE,CAAA,iBAAF,EAAE,CAAC;CAC3B;AAED,SAASC,oBAAoB,GAA+B;IAC1D,OAAO,IAAIC,SAAQ,QAAA,CAAmBH,WAAW,EAAE,EAAE;QACnDI,SAAS,EAAE,IAAI;QACfC,qBAAqB,EAAE,EAAE;QACzBC,mBAAmB,EAAE,EAAE;KACxB,CAAC,CAAC;CACJ;AAED,eAAeC,eAAe,CAACC,WAAyB,EAAiB;IACvE,MAAMC,YAAY,CAACC,QAAQ,CAAC,MAAM,EAAEF,WAAW,EAAE;QAC/CG,OAAO,EAAE,EAAE;QACXP,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;CACJ;AAED,SAASQ,UAAU,GAAuB;IACxC,IAAI;YACKT,GAAmD;YAAnDA,IAAyD;QAAhE,OAAOA,CAAAA,IAAyD,GAAzDA,CAAAA,GAAmD,GAAnDA,SAAQ,QAAA,CAACU,IAAI,CAAmBZ,CAAAA,GAAAA,aAAgB,AAAE,CAAA,iBAAF,EAAE,CAAC,SAAM,GAAzDE,KAAAA,CAAyD,GAAzDA,GAAmD,CAAEW,IAAI,YAAzDX,IAAyD,GAAI,IAAI,CAAC;KAC1E,CAAC,OAAOY,KAAK,EAAO;QACnB,IAAIA,KAAK,CAACC,IAAI,KAAK,QAAQ,EAAE;YAC3B,OAAO,IAAI,CAAC;SACb;QACD,MAAMD,KAAK,CAAC;KACb;CACF;AAED,SAASE,cAAc,GAAkB;QAChCC,WAAsB;IAA7B,OAAOA,CAAAA,WAAsB,GAAtBA,OAAO,CAACC,GAAG,CAACC,UAAU,YAAtBF,WAAsB,GAAI,IAAI,CAAC;CACvC;AAED,6EAA6E;AAC7E,eAAeG,2BAA2B,GAAoB;IAC5D,MAAMC,QAAQ,GAAG,MAAMpB,oBAAoB,EAAE,AAAC;IAC9C,IAAIqB,EAAE,GAAG,MAAMD,QAAQ,CAACE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,AAAC;IAE/C,IAAI,CAACD,EAAE,EAAE;QACPA,EAAE,GAAGE,OAAM,QAAA,CAACC,UAAU,EAAE,CAAC;QACzB,MAAMJ,QAAQ,CAACZ,QAAQ,CAAC,MAAM,EAAEa,EAAE,CAAC,CAAC;KACrC;IAED,OAAOA,EAAE,CAAC;CACX;AAED,MAAMd,YAAY,GAAGkB,MAAM,CAACC,MAAM,CAAC1B,oBAAoB,EAAE,EAAE;IACzDU,UAAU;IACVL,eAAe;IACfU,cAAc;IACdnB,YAAY;IACZE,WAAW;IACXE,oBAAoB;IACpBmB,2BAA2B;CAC5B,CAAC,AAAC;eAEYZ,YAAY"}
|
|
@@ -45,10 +45,15 @@ async function showLoginPromptAsync({ printNewLine =false , otp , ...options } =
|
|
|
45
45
|
throw new _errors.CommandError("OFFLINE", "Cannot authenticate in offline-mode");
|
|
46
46
|
}
|
|
47
47
|
const hasCredentials = options.username && options.password;
|
|
48
|
+
const sso = options.sso;
|
|
48
49
|
if (printNewLine) {
|
|
49
50
|
Log.log();
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
if (sso) {
|
|
53
|
+
await (0, _user).ssoLoginAsync();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
Log.log(hasCredentials ? `Logging in to EAS with email or username (exit and run 'eas login' for other options)` : `Log in to EAS with email or username (exit and run 'eas login' for other options)`);
|
|
52
57
|
let username = options.username;
|
|
53
58
|
let password = options.password;
|
|
54
59
|
if (!hasCredentials) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/api/user/actions.ts"],"sourcesContent":["import assert from 'assert';\nimport chalk from 'chalk';\n\nimport * as Log from '../../log';\nimport { env } from '../../utils/env';\nimport { CommandError } from '../../utils/errors';\nimport { learnMore } from '../../utils/link';\nimport promptAsync, { Question } from '../../utils/prompts';\nimport { ApiV2Error } from '../rest/client';\nimport { retryUsernamePasswordAuthWithOTPAsync } from './otp';\nimport { Actor, getUserAsync, loginAsync } from './user';\n\n/** Show login prompt while prompting for missing credentials. */\nexport async function showLoginPromptAsync({\n printNewLine = false,\n otp,\n ...options\n}: {\n printNewLine?: boolean;\n username?: string;\n password?: string;\n otp?: string;\n} = {}): Promise<void> {\n if (env.EXPO_OFFLINE) {\n throw new CommandError('OFFLINE', 'Cannot authenticate in offline-mode');\n }\n const hasCredentials = options.username && options.password;\n\n if (printNewLine) {\n Log.log();\n }\n\n Log.log(hasCredentials
|
|
1
|
+
{"version":3,"sources":["../../../../src/api/user/actions.ts"],"sourcesContent":["import assert from 'assert';\nimport chalk from 'chalk';\n\nimport * as Log from '../../log';\nimport { env } from '../../utils/env';\nimport { CommandError } from '../../utils/errors';\nimport { learnMore } from '../../utils/link';\nimport promptAsync, { Question } from '../../utils/prompts';\nimport { ApiV2Error } from '../rest/client';\nimport { retryUsernamePasswordAuthWithOTPAsync } from './otp';\nimport { Actor, getUserAsync, loginAsync, ssoLoginAsync } from './user';\n\n/** Show login prompt while prompting for missing credentials. */\nexport async function showLoginPromptAsync({\n printNewLine = false,\n otp,\n ...options\n}: {\n printNewLine?: boolean;\n username?: string;\n password?: string;\n otp?: string;\n sso?: boolean | undefined;\n} = {}): Promise<void> {\n if (env.EXPO_OFFLINE) {\n throw new CommandError('OFFLINE', 'Cannot authenticate in offline-mode');\n }\n const hasCredentials = options.username && options.password;\n const sso = options.sso;\n\n if (printNewLine) {\n Log.log();\n }\n\n if (sso) {\n await ssoLoginAsync();\n return;\n }\n\n Log.log(\n hasCredentials\n ? `Logging in to EAS with email or username (exit and run 'eas login' for other options)`\n : `Log in to EAS with email or username (exit and run 'eas login' for other options)`\n );\n\n let username = options.username;\n let password = options.password;\n\n if (!hasCredentials) {\n const resolved = await promptAsync(\n [\n !options.username && {\n type: 'text',\n name: 'username',\n message: 'Email or username',\n },\n !options.password && {\n type: 'password',\n name: 'password',\n message: 'Password',\n },\n ].filter(Boolean) as Question<string>[],\n {\n nonInteractiveHelp: `Use the EXPO_TOKEN environment variable to authenticate in CI (${learnMore(\n 'https://docs.expo.dev/accounts/programmatic-access/'\n )})`,\n }\n );\n username ??= resolved.username;\n password ??= resolved.password;\n }\n // This is just for the types.\n assert(username && password);\n\n try {\n await loginAsync({\n username,\n password,\n otp,\n });\n } catch (e) {\n if (e instanceof ApiV2Error && e.expoApiV2ErrorCode === 'ONE_TIME_PASSWORD_REQUIRED') {\n await retryUsernamePasswordAuthWithOTPAsync(\n username,\n password,\n e.expoApiV2ErrorMetadata as any\n );\n } else {\n throw e;\n }\n }\n}\n\n/** Ensure the user is logged in, if not, prompt to login. */\nexport async function ensureLoggedInAsync(): Promise<Actor> {\n let user = await getUserAsync().catch(() => null);\n\n if (!user) {\n Log.warn(chalk.yellow`An Expo user account is required to proceed.`);\n await showLoginPromptAsync({ printNewLine: true });\n user = await getUserAsync();\n }\n\n assert(user, 'User should be logged in');\n return user;\n}\n"],"names":["showLoginPromptAsync","ensureLoggedInAsync","Log","printNewLine","otp","options","env","EXPO_OFFLINE","CommandError","hasCredentials","username","password","sso","log","ssoLoginAsync","resolved","promptAsync","type","name","message","filter","Boolean","nonInteractiveHelp","learnMore","assert","loginAsync","e","ApiV2Error","expoApiV2ErrorCode","retryUsernamePasswordAuthWithOTPAsync","expoApiV2ErrorMetadata","user","getUserAsync","catch","warn","chalk","yellow"],"mappings":"AAAA;;;;QAasBA,oBAAoB,GAApBA,o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D,IAAI8B,IAAI,GAAG,MAAMC,CAAAA,GAAAA,KAAY,AAAE,CAAA,aAAF,EAAE,CAACC,KAAK,CAAC,IAAM,IAAI;IAAA,CAAC,AAAC;IAElD,IAAI,CAACF,IAAI,EAAE;QACT7B,GAAG,CAACgC,IAAI,CAACC,MAAK,QAAA,CAACC,MAAM,CAAC,4CAA4C,CAAC,CAAC,CAAC;QACrE,MAAMpC,oBAAoB,CAAC;YAAEG,YAAY,EAAE,IAAI;SAAE,CAAC,CAAC;QACnD4B,IAAI,GAAG,MAAMC,CAAAA,GAAAA,KAAY,AAAE,CAAA,aAAF,EAAE,CAAC;KAC7B;IAEDR,CAAAA,GAAAA,OAAM,AAAkC,CAAA,QAAlC,CAACO,IAAI,EAAE,0BAA0B,CAAC,CAAC;IACzC,OAAOA,IAAI,CAAC;CACb"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.getSessionUsingBrowserAuthFlowAsync = getSessionUsingBrowserAuthFlowAsync;
|
|
6
|
+
var _assert = _interopRequireDefault(require("assert"));
|
|
7
|
+
var _betterOpn = _interopRequireDefault(require("better-opn"));
|
|
8
|
+
var _http = _interopRequireDefault(require("http"));
|
|
9
|
+
var _querystring = _interopRequireDefault(require("querystring"));
|
|
10
|
+
var Log = _interopRequireWildcard(require("../../log"));
|
|
11
|
+
function _interopRequireDefault(obj) {
|
|
12
|
+
return obj && obj.__esModule ? obj : {
|
|
13
|
+
default: obj
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function _interopRequireWildcard(obj) {
|
|
17
|
+
if (obj && obj.__esModule) {
|
|
18
|
+
return obj;
|
|
19
|
+
} else {
|
|
20
|
+
var newObj = {};
|
|
21
|
+
if (obj != null) {
|
|
22
|
+
for(var key in obj){
|
|
23
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
24
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
|
25
|
+
if (desc.get || desc.set) {
|
|
26
|
+
Object.defineProperty(newObj, key, desc);
|
|
27
|
+
} else {
|
|
28
|
+
newObj[key] = obj[key];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
newObj.default = obj;
|
|
34
|
+
return newObj;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const successBody = `
|
|
38
|
+
<!DOCTYPE html>
|
|
39
|
+
<html lang="en">
|
|
40
|
+
<head>
|
|
41
|
+
<title>Expo SSO Login</title>
|
|
42
|
+
<meta charset="utf-8">
|
|
43
|
+
<style type="text/css">
|
|
44
|
+
html {
|
|
45
|
+
margin: 0;
|
|
46
|
+
padding: 0
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
body {
|
|
50
|
+
background-color: #fff;
|
|
51
|
+
font-family: Tahoma,Verdana;
|
|
52
|
+
font-size: 16px;
|
|
53
|
+
color: #000;
|
|
54
|
+
max-width: 100%;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
padding: .5rem;
|
|
57
|
+
margin: 1em;
|
|
58
|
+
overflow-wrap: break-word
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
61
|
+
</head>
|
|
62
|
+
<body>
|
|
63
|
+
SSO login complete. You may now close this tab and return to the command prompt.
|
|
64
|
+
</body>
|
|
65
|
+
</html>`;
|
|
66
|
+
async function getSessionUsingBrowserAuthFlowAsync({ expoWebsiteUrl }) {
|
|
67
|
+
const scheme = "http";
|
|
68
|
+
const hostname = "localhost";
|
|
69
|
+
const path = "/auth/callback";
|
|
70
|
+
const buildExpoSsoLoginUrl = (port)=>{
|
|
71
|
+
const data = {
|
|
72
|
+
app_redirect_uri: `${scheme}://${hostname}:${port}${path}`
|
|
73
|
+
};
|
|
74
|
+
const params = _querystring.default.stringify(data);
|
|
75
|
+
return `${expoWebsiteUrl}/sso-login?${params}`;
|
|
76
|
+
};
|
|
77
|
+
// Start server and begin auth flow
|
|
78
|
+
const executeAuthFlow = ()=>{
|
|
79
|
+
return new Promise(async (resolve, reject)=>{
|
|
80
|
+
const connections = new Set();
|
|
81
|
+
const server = _http.default.createServer((request, response)=>{
|
|
82
|
+
try {
|
|
83
|
+
var ref;
|
|
84
|
+
if (!(request.method === "GET" && ((ref = request.url) == null ? void 0 : ref.includes(path)))) {
|
|
85
|
+
throw new Error("Unexpected SSO login response.");
|
|
86
|
+
}
|
|
87
|
+
const url = new URL(request.url, `http:${request.headers.host}`);
|
|
88
|
+
const sessionSecret = url.searchParams.get("session_secret");
|
|
89
|
+
if (!sessionSecret) {
|
|
90
|
+
throw new Error("Request missing session_secret search parameter.");
|
|
91
|
+
}
|
|
92
|
+
resolve(sessionSecret);
|
|
93
|
+
response.writeHead(200, {
|
|
94
|
+
"Content-Type": "text/html"
|
|
95
|
+
});
|
|
96
|
+
response.write(successBody);
|
|
97
|
+
response.end();
|
|
98
|
+
} catch (error) {
|
|
99
|
+
reject(error);
|
|
100
|
+
} finally{
|
|
101
|
+
server.close();
|
|
102
|
+
// Ensure that the server shuts down
|
|
103
|
+
for (const connection of connections){
|
|
104
|
+
connection.destroy();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
server.listen(0, hostname, ()=>{
|
|
109
|
+
Log.log("Waiting for browser login...");
|
|
110
|
+
const address = server.address();
|
|
111
|
+
(0, _assert).default(address !== null && typeof address === "object", "Server address and port should be set after listening has begun");
|
|
112
|
+
const port = address.port;
|
|
113
|
+
const authorizeUrl = buildExpoSsoLoginUrl(port);
|
|
114
|
+
(0, _betterOpn).default(authorizeUrl);
|
|
115
|
+
});
|
|
116
|
+
server.on("connection", (connection)=>{
|
|
117
|
+
connections.add(connection);
|
|
118
|
+
connection.on("close", ()=>{
|
|
119
|
+
connections.delete(connection);
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
return await executeAuthFlow();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
//# sourceMappingURL=expoSsoLauncher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/api/user/expoSsoLauncher.ts"],"sourcesContent":["import assert from 'assert';\nimport openBrowserAsync from 'better-opn';\nimport http from 'http';\nimport { Socket } from 'node:net';\nimport querystring from 'querystring';\n\nimport * as Log from '../../log';\n\nconst successBody = `\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>Expo SSO Login</title>\n <meta charset=\"utf-8\">\n <style type=\"text/css\">\n html {\n margin: 0;\n padding: 0\n }\n\n body {\n background-color: #fff;\n font-family: Tahoma,Verdana;\n font-size: 16px;\n color: #000;\n max-width: 100%;\n box-sizing: border-box;\n padding: .5rem;\n margin: 1em;\n overflow-wrap: break-word\n }\n </style>\n</head>\n<body>\n SSO login complete. You may now close this tab and return to the command prompt.\n</body>\n</html>`;\n\nexport async function getSessionUsingBrowserAuthFlowAsync({\n expoWebsiteUrl,\n}: {\n expoWebsiteUrl: string;\n}): Promise<string> {\n const scheme = 'http';\n const hostname = 'localhost';\n const path = '/auth/callback';\n\n const buildExpoSsoLoginUrl = (port: number): string => {\n const data = {\n app_redirect_uri: `${scheme}://${hostname}:${port}${path}`,\n };\n const params = querystring.stringify(data);\n return `${expoWebsiteUrl}/sso-login?${params}`;\n };\n\n // Start server and begin auth flow\n const executeAuthFlow = (): Promise<string> => {\n return new Promise<string>(async (resolve, reject) => {\n const connections = new Set<Socket>();\n\n const server = http.createServer(\n (request: http.IncomingMessage, response: http.ServerResponse) => {\n try {\n if (!(request.method === 'GET' && request.url?.includes(path))) {\n throw new Error('Unexpected SSO login response.');\n }\n const url = new URL(request.url, `http:${request.headers.host}`);\n const sessionSecret = url.searchParams.get('session_secret');\n\n if (!sessionSecret) {\n throw new Error('Request missing session_secret search parameter.');\n }\n resolve(sessionSecret);\n response.writeHead(200, { 'Content-Type': 'text/html' });\n response.write(successBody);\n response.end();\n } catch (error) {\n reject(error);\n } finally {\n server.close();\n // Ensure that the server shuts down\n for (const connection of connections) {\n connection.destroy();\n }\n }\n }\n );\n\n server.listen(0, hostname, () => {\n Log.log('Waiting for browser login...');\n\n const address = server.address();\n assert(\n address !== null && typeof address === 'object',\n 'Server address and port should be set after listening has begun'\n );\n const port = address.port;\n const authorizeUrl = buildExpoSsoLoginUrl(port);\n openBrowserAsync(authorizeUrl);\n });\n\n server.on('connection', (connection) => {\n connections.add(connection);\n\n connection.on('close', () => {\n connections.delete(connection);\n });\n });\n });\n };\n\n return await executeAuthFlow();\n}\n"],"names":["getSessionUsingBrowserAuthFlowAsync","Log","successBody","expoWebsiteUrl","scheme","hostname","path","buildExpoSsoLoginUrl","port","data","app_redirect_uri","params","querystring","stringify","executeAuthFlow","Promise","resolve","reject","connections","Set","server","http","createServer","request","response","method","url","includes","Error","URL","headers","host","sessionSecret","searchParams","get","writeHead","write","end","error","close","connection","destroy","listen","log","address","assert","authorizeUrl","openBrowserAsync","on","add","delete"],"mappings":"AAAA;;;;QAsCsBA,mCAAmC,GAAnCA,mCAAmC;AAtCtC,IAAA,OAAQ,kCAAR,QAAQ,EAAA;AACE,IAAA,UAAY,kCAAZ,YAAY,EAAA;AACxB,IAAA,KAAM,kCAAN,MAAM,EAAA;AAEC,IAAA,YAAa,kCAAb,aAAa,EAAA;AAEzBC,IAAAA,GAAG,mCAAM,WAAW,EAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEf,MAAMC,WAAW,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4Bd,CAAC,AAAC;AAEF,eAAeF,mCAAmC,CAAC,EACxDG,cAAc,CAAA,EAGf,EAAmB;IAClB,MAAMC,MAAM,GAAG,MAAM,AAAC;IACtB,MAAMC,QAAQ,GAAG,WAAW,AAAC;IAC7B,MAAMC,IAAI,GAAG,gBAAgB,AAAC;IAE9B,MAAMC,oB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ACJ,CAAC,CAAC;SACJ,CAAC,CAAC;KACJ,AAAC;IAEF,OAAO,MAAM1B,eAAe,EAAE,CAAC;CAChC"}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
exports.getActorDisplayName = getActorDisplayName;
|
|
6
6
|
exports.getUserAsync = getUserAsync;
|
|
7
7
|
exports.loginAsync = loginAsync;
|
|
8
|
+
exports.ssoLoginAsync = ssoLoginAsync;
|
|
8
9
|
exports.logoutAsync = logoutAsync;
|
|
9
10
|
exports.ANONYMOUS_USERNAME = void 0;
|
|
10
11
|
var _fs = require("fs");
|
|
@@ -13,10 +14,12 @@ var Log = _interopRequireWildcard(require("../../log"));
|
|
|
13
14
|
var Analytics = _interopRequireWildcard(require("../../utils/analytics/rudderstackClient"));
|
|
14
15
|
var _codesigning = require("../../utils/codesigning");
|
|
15
16
|
var _env = require("../../utils/env");
|
|
17
|
+
var _endpoint = require("../endpoint");
|
|
16
18
|
var _client = require("../graphql/client");
|
|
17
19
|
var _userQuery = require("../graphql/queries/UserQuery");
|
|
18
20
|
var _client1 = require("../rest/client");
|
|
19
21
|
var _userSettings = _interopRequireDefault(require("./UserSettings"));
|
|
22
|
+
var _expoSsoLauncher = require("./expoSsoLauncher");
|
|
20
23
|
function _interopRequireDefault(obj) {
|
|
21
24
|
return obj && obj.__esModule ? obj : {
|
|
22
25
|
default: obj
|
|
@@ -50,6 +53,8 @@ function getActorDisplayName(user) {
|
|
|
50
53
|
switch(user == null ? void 0 : user.__typename){
|
|
51
54
|
case "User":
|
|
52
55
|
return user.username;
|
|
56
|
+
case "SSOUser":
|
|
57
|
+
return user.username;
|
|
53
58
|
case "Robot":
|
|
54
59
|
return user.firstName ? `${user.firstName} (robot)` : "robot";
|
|
55
60
|
default:
|
|
@@ -78,29 +83,30 @@ async function loginAsync(json) {
|
|
|
78
83
|
body: JSON.stringify(json)
|
|
79
84
|
});
|
|
80
85
|
const { data: { sessionSecret } , } = await res.json();
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
id
|
|
85
|
-
username
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
`, {}, {
|
|
89
|
-
fetchOptions: {
|
|
90
|
-
headers: {
|
|
91
|
-
"expo-session": sessionSecret
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
additionalTypenames: []
|
|
95
|
-
}).toPromise();
|
|
96
|
-
const { data: { viewer } , } = result;
|
|
86
|
+
const userData = await fetchUserAsync({
|
|
87
|
+
sessionSecret
|
|
88
|
+
});
|
|
97
89
|
await _userSettings.default.setSessionAsync({
|
|
98
90
|
sessionSecret,
|
|
99
|
-
userId:
|
|
100
|
-
username:
|
|
91
|
+
userId: userData.id,
|
|
92
|
+
username: userData.username,
|
|
101
93
|
currentConnection: "Username-Password-Authentication"
|
|
102
94
|
});
|
|
103
95
|
}
|
|
96
|
+
async function ssoLoginAsync() {
|
|
97
|
+
const sessionSecret = await (0, _expoSsoLauncher).getSessionUsingBrowserAuthFlowAsync({
|
|
98
|
+
expoWebsiteUrl: (0, _endpoint).getExpoWebsiteBaseUrl()
|
|
99
|
+
});
|
|
100
|
+
const userData = await fetchUserAsync({
|
|
101
|
+
sessionSecret
|
|
102
|
+
});
|
|
103
|
+
await _userSettings.default.setSessionAsync({
|
|
104
|
+
sessionSecret,
|
|
105
|
+
userId: userData.id,
|
|
106
|
+
username: userData.username,
|
|
107
|
+
currentConnection: "Browser-Flow-Authentication"
|
|
108
|
+
});
|
|
109
|
+
}
|
|
104
110
|
async function logoutAsync() {
|
|
105
111
|
currentUser = undefined;
|
|
106
112
|
await Promise.all([
|
|
@@ -112,5 +118,27 @@ async function logoutAsync() {
|
|
|
112
118
|
]);
|
|
113
119
|
Log.log("Logged out");
|
|
114
120
|
}
|
|
121
|
+
async function fetchUserAsync({ sessionSecret }) {
|
|
122
|
+
const result = await _client.graphqlClient.query(_graphqlTag.default`
|
|
123
|
+
query UserQuery {
|
|
124
|
+
meUserActor {
|
|
125
|
+
id
|
|
126
|
+
username
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
`, {}, {
|
|
130
|
+
fetchOptions: {
|
|
131
|
+
headers: {
|
|
132
|
+
"expo-session": sessionSecret
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
additionalTypenames: []
|
|
136
|
+
}).toPromise();
|
|
137
|
+
const { data } = result;
|
|
138
|
+
return {
|
|
139
|
+
id: data.meUserActor.id,
|
|
140
|
+
username: data.meUserActor.username
|
|
141
|
+
};
|
|
142
|
+
}
|
|
115
143
|
|
|
116
144
|
//# sourceMappingURL=user.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/api/user/user.ts"],"sourcesContent":["import { promises as fs } from 'fs';\nimport gql from 'graphql-tag';\n\nimport { CurrentUserQuery } from '../../graphql/generated';\nimport * as Log from '../../log';\nimport * as Analytics from '../../utils/analytics/rudderstackClient';\nimport { getDevelopmentCodeSigningDirectory } from '../../utils/codesigning';\nimport { env } from '../../utils/env';\nimport { graphqlClient } from '../graphql/client';\nimport { UserQuery } from '../graphql/queries/UserQuery';\nimport { fetchAsync } from '../rest/client';\nimport UserSettings from './UserSettings';\n\nexport type Actor = NonNullable<CurrentUserQuery['meActor']>;\n\nlet currentUser: Actor | undefined;\n\nexport const ANONYMOUS_USERNAME = 'anonymous';\n\n/**\n * Resolve the name of the actor, either normal user or robot user.\n * This should be used whenever the \"current user\" needs to be displayed.\n * The display name CANNOT be used as project owner.\n */\nexport function getActorDisplayName(user?: Actor): string {\n switch (user?.__typename) {\n case 'User':\n return user.username;\n case 'Robot':\n return user.firstName ? `${user.firstName} (robot)` : 'robot';\n default:\n return ANONYMOUS_USERNAME;\n }\n}\n\nexport async function getUserAsync(): Promise<Actor | undefined> {\n const hasCredentials = UserSettings.getAccessToken() || UserSettings.getSession()?.sessionSecret;\n if (!env.EXPO_OFFLINE && !currentUser && hasCredentials) {\n const user = await UserQuery.currentUserAsync();\n currentUser = user ?? undefined;\n if (user) {\n await Analytics.setUserDataAsync(user.id, {\n username: getActorDisplayName(user),\n user_id: user.id,\n user_type: user.__typename,\n });\n }\n }\n return currentUser;\n}\n\nexport async function loginAsync(json: {\n username: string;\n password: string;\n otp?: string;\n}): Promise<void> {\n const res = await fetchAsync('auth/loginAsync', {\n method: 'POST',\n body: JSON.stringify(json),\n });\n const {\n data: { sessionSecret },\n } = await res.json();\n const
|
|
1
|
+
{"version":3,"sources":["../../../../src/api/user/user.ts"],"sourcesContent":["import { promises as fs } from 'fs';\nimport gql from 'graphql-tag';\n\nimport { CurrentUserQuery } from '../../graphql/generated';\nimport * as Log from '../../log';\nimport * as Analytics from '../../utils/analytics/rudderstackClient';\nimport { getDevelopmentCodeSigningDirectory } from '../../utils/codesigning';\nimport { env } from '../../utils/env';\nimport { getExpoWebsiteBaseUrl } from '../endpoint';\nimport { graphqlClient } from '../graphql/client';\nimport { UserQuery } from '../graphql/queries/UserQuery';\nimport { fetchAsync } from '../rest/client';\nimport UserSettings from './UserSettings';\nimport { getSessionUsingBrowserAuthFlowAsync } from './expoSsoLauncher';\n\nexport type Actor = NonNullable<CurrentUserQuery['meActor']>;\n\nlet currentUser: Actor | undefined;\n\nexport const ANONYMOUS_USERNAME = 'anonymous';\n\n/**\n * Resolve the name of the actor, either normal user or robot user.\n * This should be used whenever the \"current user\" needs to be displayed.\n * The display name CANNOT be used as project owner.\n */\nexport function getActorDisplayName(user?: Actor): string {\n switch (user?.__typename) {\n case 'User':\n return user.username;\n case 'SSOUser':\n return user.username;\n case 'Robot':\n return user.firstName ? `${user.firstName} (robot)` : 'robot';\n default:\n return ANONYMOUS_USERNAME;\n }\n}\n\nexport async function getUserAsync(): Promise<Actor | undefined> {\n const hasCredentials = UserSettings.getAccessToken() || UserSettings.getSession()?.sessionSecret;\n if (!env.EXPO_OFFLINE && !currentUser && hasCredentials) {\n const user = await UserQuery.currentUserAsync();\n currentUser = user ?? undefined;\n if (user) {\n await Analytics.setUserDataAsync(user.id, {\n username: getActorDisplayName(user),\n user_id: user.id,\n user_type: user.__typename,\n });\n }\n }\n return currentUser;\n}\n\nexport async function loginAsync(json: {\n username: string;\n password: string;\n otp?: string;\n}): Promise<void> {\n const res = await fetchAsync('auth/loginAsync', {\n method: 'POST',\n body: JSON.stringify(json),\n });\n const {\n data: { sessionSecret },\n } = await res.json();\n\n const userData = await fetchUserAsync({ sessionSecret });\n\n await UserSettings.setSessionAsync({\n sessionSecret,\n userId: userData.id,\n username: userData.username,\n currentConnection: 'Username-Password-Authentication',\n });\n}\n\nexport async function ssoLoginAsync(): Promise<void> {\n const sessionSecret = await getSessionUsingBrowserAuthFlowAsync({\n expoWebsiteUrl: getExpoWebsiteBaseUrl(),\n });\n const userData = await fetchUserAsync({ sessionSecret });\n\n await UserSettings.setSessionAsync({\n sessionSecret,\n userId: userData.id,\n username: userData.username,\n currentConnection: 'Browser-Flow-Authentication',\n });\n}\n\nexport async function logoutAsync(): Promise<void> {\n currentUser = undefined;\n await Promise.all([\n fs.rm(getDevelopmentCodeSigningDirectory(), { recursive: true, force: true }),\n UserSettings.setSessionAsync(undefined),\n ]);\n Log.log('Logged out');\n}\n\nasync function fetchUserAsync({\n sessionSecret,\n}: {\n sessionSecret: string;\n}): Promise<{ id: string; username: string }> {\n const result = await graphqlClient\n .query(\n gql`\n query UserQuery {\n meUserActor {\n id\n username\n }\n }\n `,\n {},\n {\n fetchOptions: {\n headers: {\n 'expo-session': sessionSecret,\n },\n },\n additionalTypenames: [] /* UserQuery has immutable fields */,\n }\n )\n .toPromise();\n const { data } = result;\n return {\n id: data.meUserActor.id,\n username: data.meUserActor.username,\n };\n}\n"],"names":["getActorDisplayName","getUserAsync","loginAsync","ssoLoginAsync","logoutAsync","Log","Analytics","currentUser","ANONYMOUS_USERNAME","user","__typename","username","firstName","UserSettings","hasCredentials","getAccessToken","getSession","sessionSecret","env","EXPO_OFFLINE","UserQuery","currentUserAsync","undefined","setUserDataAsync","id","user_id","user_type","json","res","fetchAsync","method","body","JSON","stringify","data","userData","fetchUserAsync","setSessionAsync","userId","currentConnection","getSessionUsingBrowserAuthFlowAsync","expoWebsiteUrl","getExpoWebsiteBaseUrl","Promise","all","fs","rm","getDevelopmentCodeSigningDirectory","recursive","force","log","result","graphqlClient","query","gql","fetchOptions","headers","additionalTypenames","toPromise","meUserActor"],"mappings":"AAAA;;;;QA0BgBA,mBAAmB,GAAnBA,mBAAmB;QAabC,YAAY,GAAZA,YAAY;QAgBZC,UAAU,GAAVA,UAAU;QAuBVC,aAAa,GAAbA,aAAa;QAcbC,WAAW,GAAXA,WAAW;;AA5FF,IAAA,GAAI,WAAJ,IAAI,CAAA;AACnB,IAAA,WAAa,kCAAb,aAAa,EAAA;AAGjBC,IAAAA,GAAG,mCAAM,WAAW,EAAjB;AACHC,IAAAA,SAAS,mCAAM,yCAAyC,EAA/C;AAC8B,IAAA,YAAyB,WAAzB,yBAAyB,CAAA;AACxD,IAAA,IAAiB,WAAjB,iBAAiB,CAAA;AACC,IAAA,SAAa,WAAb,aAAa,CAAA;AACrB,IAAA,OAAmB,WAAnB,mBAAmB,CAAA;AACvB,IAAA,UAA8B,WAA9B,8BAA8B,CAAA;AAC7B,IAAA,QAAgB,WAAhB,gBAAgB,CAAA;AAClB,IAAA,aAAgB,kCAAhB,gBAAgB,EAAA;AACW,IAAA,gBAAmB,WAAnB,mBAAmB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIvE,IAAIC,WAAW,AAAmB,AAAC;AAE5B,MAAMC,kBAAkB,GAAG,WAAW,AAAC;QAAjCA,kBAAkB,GAAlBA,kBAAkB;AAOxB,SAASR,mBAAmB,CAACS,IAAY,EAAU;IACxD,OAAQA,IAAI,QAAY,GAAhBA,KAAAA,CAAgB,GAAhBA,IAAI,CAAEC,UAAU;QACtB,KAAK,MAAM;YACT,OAAOD,IAAI,CAACE,QAAQ,CAAC;QACvB,KAAK,SAAS;YACZ,OAAOF,IAAI,CAACE,QAAQ,CAAC;QACvB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,OAAa,cAAA,CAC/BC,KAAK,CACJC,WAAG,QAAA,CAAC;;;;;;;MAOJ,CAAC,EACD,EAAE,EACF;QACEC,YAAY,EAAE;YACZC,OAAO,EAAE;gBACP,cAAc,EAAEvC,aAAa;aAC9B;SACF;QACDwC,mBAAmB,EAAE,EAAE;KACxB,CACF,CACAC,SAAS,EAAE,AAAC;IACf,MAAM,EAAExB,IAAI,CAAA,EAAE,GAAGiB,MAAM,AAAC;IACxB,OAAO;QACL3B,EAAE,EAAEU,IAAI,CAACyB,WAAW,CAACnC,EAAE;QACvBb,QAAQ,EAAEuB,IAAI,CAACyB,WAAW,CAAChD,QAAQ;KACpC,CAAC;CACH"}
|
|
@@ -43,7 +43,9 @@ const expoExport = async (argv)=>{
|
|
|
43
43
|
"--dump-sourcemap": Boolean,
|
|
44
44
|
"--max-workers": Number,
|
|
45
45
|
"--output-dir": String,
|
|
46
|
-
"--platform":
|
|
46
|
+
"--platform": [
|
|
47
|
+
String
|
|
48
|
+
],
|
|
47
49
|
"--no-minify": Boolean,
|
|
48
50
|
// Hack: This is added because EAS CLI always includes the flag.
|
|
49
51
|
// If supplied, we'll do nothing with the value, but at least the process won't crash.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/export/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 expoExport: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--dump-assetmap': Boolean,\n '--dev': Boolean,\n '--dump-sourcemap': Boolean,\n '--max-workers': Number,\n '--output-dir': String,\n '--platform': String,\n '--no-minify': Boolean,\n\n // Hack: This is added because EAS CLI always includes the flag.\n // If supplied, we'll do nothing with the value, but at least the process won't crash.\n // Note that we also don't show this value in the `--help` prompt since we don't want people to use it.\n '--experimental-bundle': Boolean,\n\n // Aliases\n '-h': '--help',\n // '-s': '--dump-sourcemap',\n // '-d': '--dump-assetmap',\n '-c': '--clear',\n '-p': '--platform',\n // Interop with Metro docs and RedBox errors.\n '--reset-cache': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Export the static files of the app for hosting it on a web server`,\n chalk`npx expo export {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--dev Configure static files for developing locally using a non-https server`,\n chalk`--output-dir <dir> The directory to export the static files to. {dim Default: dist}`,\n `--max-workers <number> Maximum number of tasks to allow the bundler to spawn`,\n `--dump-assetmap Dump the asset map for further processing`,\n `--dump-sourcemap Dump the source map for debugging the JS bundle`,\n chalk`-p, --platform <platform> Options: android, ios, web, all. {dim Default: all}`,\n `--no-minify Prevent minifying source`,\n `-c, --clear Clear the bundler cache`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n const { resolveOptionsAsync } = await import('./resolveOptions');\n const options = await resolveOptionsAsync(projectRoot, args).catch(logCmdError);\n\n const { exportAsync } = await import('./exportAsync');\n return exportAsync(projectRoot, options).catch(logCmdError);\n};\n"],"names":["expoExport","argv","args","assertArgs","Boolean","Number","String","printHelp","chalk","join","projectRoot","getProjectRoot","resolveOptionsAsync","options","catch","logCmdError","exportAsync"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAe,WAAf,eAAe,CAAA;AACzC,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AA4BtB,CAAA,WA5BsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,iBAAiB,EAAEA,OAAO;QAC1B,OAAO,EAAEA,OAAO;QAChB,kBAAkB,EAAEA,OAAO;QAC3B,eAAe,EAAEC,MAAM;QACvB,cAAc,EAAEC,MAAM;QACtB,YAAY,
|
|
1
|
+
{"version":3,"sources":["../../../src/export/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 expoExport: Command = async (argv) => {\n const args = assertArgs(\n {\n // Types\n '--help': Boolean,\n '--clear': Boolean,\n '--dump-assetmap': Boolean,\n '--dev': Boolean,\n '--dump-sourcemap': Boolean,\n '--max-workers': Number,\n '--output-dir': String,\n '--platform': [String],\n '--no-minify': Boolean,\n\n // Hack: This is added because EAS CLI always includes the flag.\n // If supplied, we'll do nothing with the value, but at least the process won't crash.\n // Note that we also don't show this value in the `--help` prompt since we don't want people to use it.\n '--experimental-bundle': Boolean,\n\n // Aliases\n '-h': '--help',\n // '-s': '--dump-sourcemap',\n // '-d': '--dump-assetmap',\n '-c': '--clear',\n '-p': '--platform',\n // Interop with Metro docs and RedBox errors.\n '--reset-cache': '--clear',\n },\n argv\n );\n\n if (args['--help']) {\n printHelp(\n `Export the static files of the app for hosting it on a web server`,\n chalk`npx expo export {dim <dir>}`,\n [\n chalk`<dir> Directory of the Expo project. {dim Default: Current working directory}`,\n `--dev Configure static files for developing locally using a non-https server`,\n chalk`--output-dir <dir> The directory to export the static files to. {dim Default: dist}`,\n `--max-workers <number> Maximum number of tasks to allow the bundler to spawn`,\n `--dump-assetmap Dump the asset map for further processing`,\n `--dump-sourcemap Dump the source map for debugging the JS bundle`,\n chalk`-p, --platform <platform> Options: android, ios, web, all. {dim Default: all}`,\n `--no-minify Prevent minifying source`,\n `-c, --clear Clear the bundler cache`,\n `-h, --help Usage info`,\n ].join('\\n')\n );\n }\n\n const projectRoot = getProjectRoot(args);\n const { resolveOptionsAsync } = await import('./resolveOptions');\n const options = await resolveOptionsAsync(projectRoot, args).catch(logCmdError);\n\n const { exportAsync } = await import('./exportAsync');\n return exportAsync(projectRoot, options).catch(logCmdError);\n};\n"],"names":["expoExport","argv","args","assertArgs","Boolean","Number","String","printHelp","chalk","join","projectRoot","getProjectRoot","resolveOptionsAsync","options","catch","logCmdError","exportAsync"],"mappings":"AAAA;;;;;;AACkB,IAAA,MAAO,kCAAP,OAAO,EAAA;AAG6B,IAAA,KAAe,WAAf,eAAe,CAAA;AACzC,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,MAAMA,UAAU,GAAY,OAAOC,IAAI,GAAK;IACjD,MAAMC,IAAI,GAAGC,CAAAA,GAAAA,KAAU,AA4BtB,CAAA,WA5BsB,CACrB;QACE,QAAQ;QACR,QAAQ,EAAEC,OAAO;QACjB,SAAS,EAAEA,OAAO;QAClB,iBAAiB,EAAEA,OAAO;QAC1B,OAAO,EAAEA,OAAO;QAChB,kBAAkB,EAAEA,OAAO;QAC3B,eAAe,EAAEC,MAAM;QACvB,cAAc,EAAEC,MAAM;QACtB,YAAY,EAAE;YAACA,MAAM;SAAC;QACtB,aAAa,EAAEF,OAAO;QAEtB,gEAAgE;QAChE,sFAAsF;QACtF,uGAAuG;QACvG,uBAAuB,EAAEA,OAAO;QAEhC,UAAU;QACV,IAAI,EAAE,QAAQ;QACd,4BAA4B;QAC5B,2BAA2B;QAC3B,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;QAClB,6CAA6C;QAC7C,eAAe,EAAE,SAAS;KAC3B,EACDH,IAAI,CACL,AAAC;IAEF,IAAIC,IAAI,CAAC,QAAQ,CAAC,EAAE;QAClBK,CAAAA,GAAAA,KAAS,AAeR,CAAA,UAfQ,CACP,CAAC,iEAAiE,CAAC,EACnEC,MAAK,QAAA,CAAC,2BAA2B,CAAC,EAClC;YACEA,MAAK,QAAA,CAAC,kGAAkG,CAAC;YACzG,CAAC,iGAAiG,CAAC;YACnGA,MAAK,QAAA,CAAC,2FAA2F,CAAC;YAClG,CAAC,gFAAgF,CAAC;YAClF,CAAC,oEAAoE,CAAC;YACtE,CAAC,0EAA0E,CAAC;YAC5EA,MAAK,QAAA,CAAC,8EAA8E,CAAC;YACrF,CAAC,mDAAmD,CAAC;YACrD,CAAC,kDAAkD,CAAC;YACpD,CAAC,qCAAqC,CAAC;SACxC,CAACC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;KACH;IAED,MAAMC,WAAW,GAAGC,CAAAA,GAAAA,KAAc,AAAM,CAAA,eAAN,CAACT,IAAI,CAAC,AAAC;IACzC,MAAM,EAAEU,mBAAmB,CAAA,EAAE,GAAG,MAAM;+CAAO,kBAAkB;MAAC,AAAC;IACjE,MAAMC,OAAO,GAAG,MAAMD,mBAAmB,CAACF,WAAW,EAAER,IAAI,CAAC,CAACY,KAAK,CAACC,OAAW,YAAA,CAAC,AAAC;IAEhF,MAAM,EAAEC,WAAW,CAAA,EAAE,GAAG,MAAM;+CAAO,eAAe;MAAC,AAAC;IACtD,OAAOA,WAAW,CAACN,WAAW,EAAEG,OAAO,CAAC,CAACC,KAAK,CAACC,OAAW,YAAA,CAAC,CAAC;CAC7D,AAAC;QAxDWf,UAAU,GAAVA,UAAU"}
|
|
@@ -7,38 +7,39 @@ exports.resolveOptionsAsync = resolveOptionsAsync;
|
|
|
7
7
|
var _config = require("@expo/config");
|
|
8
8
|
var _platformBundlers = require("../start/server/platformBundlers");
|
|
9
9
|
var _errors = require("../utils/errors");
|
|
10
|
-
function resolvePlatformOption(platformBundlers, platform1 =
|
|
11
|
-
|
|
10
|
+
function resolvePlatformOption(platformBundlers, platform1 = [
|
|
11
|
+
"all"
|
|
12
|
+
]) {
|
|
13
|
+
const platformsAvailable = Object.fromEntries(Object.entries(platformBundlers).filter(([, bundler])=>bundler === "metro"
|
|
12
14
|
));
|
|
13
|
-
if (!Object.keys(
|
|
15
|
+
if (!Object.keys(platformsAvailable).length) {
|
|
14
16
|
throw new _errors.CommandError(`No platforms are configured to use the Metro bundler in the project Expo config.`);
|
|
15
17
|
}
|
|
16
18
|
const assertPlatformBundler = (platform)=>{
|
|
17
|
-
if (!
|
|
19
|
+
if (!platformsAvailable[platform]) {
|
|
18
20
|
throw new _errors.CommandError("BAD_ARGS", `Platform "${platform}" is not configured to use the Metro bundler in the project Expo config.`);
|
|
19
21
|
}
|
|
22
|
+
return platform;
|
|
20
23
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
throw new _errors.CommandError(`Unsupported platform "${platform1}". Options are: ${Object.keys(platforms).join(",")}, all`);
|
|
41
|
-
}
|
|
24
|
+
const knownPlatforms = [
|
|
25
|
+
"android",
|
|
26
|
+
"ios",
|
|
27
|
+
"web"
|
|
28
|
+
];
|
|
29
|
+
const assertPlatformIsKnown = (platform)=>{
|
|
30
|
+
if (!knownPlatforms.includes(platform)) {
|
|
31
|
+
throw new _errors.CommandError(`Unsupported platform "${platform}". Options are: ${knownPlatforms.join(",")},all`);
|
|
32
|
+
}
|
|
33
|
+
return platform;
|
|
34
|
+
};
|
|
35
|
+
return platform1// Expand `all` to all available platforms.
|
|
36
|
+
.map((platform)=>platform === "all" ? Object.keys(platformsAvailable) : platform
|
|
37
|
+
).flat()// Remove duplicated platforms
|
|
38
|
+
.filter((platform, index, list)=>list.indexOf(platform) === index
|
|
39
|
+
)// Assert platforms are valid
|
|
40
|
+
.map((platform)=>assertPlatformIsKnown(platform)
|
|
41
|
+
).map((platform)=>assertPlatformBundler(platform)
|
|
42
|
+
);
|
|
42
43
|
}
|
|
43
44
|
async function resolveOptionsAsync(projectRoot, args) {
|
|
44
45
|
const { exp } = (0, _config).getConfig(projectRoot, {
|
|
@@ -47,11 +48,9 @@ async function resolveOptionsAsync(projectRoot, args) {
|
|
|
47
48
|
});
|
|
48
49
|
const platformBundlers = (0, _platformBundlers).getPlatformBundlers(exp);
|
|
49
50
|
var ref;
|
|
50
|
-
const platforms = resolvePlatformOption(platformBundlers, (ref = args["--platform"]) != null ? ref : "all");
|
|
51
|
-
var ref1;
|
|
52
51
|
return {
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
platforms: resolvePlatformOption(platformBundlers, args["--platform"]),
|
|
53
|
+
outputDir: (ref = args["--output-dir"]) != null ? ref : "dist",
|
|
55
54
|
minify: !args["--no-minify"],
|
|
56
55
|
clear: !!args["--clear"],
|
|
57
56
|
dev: !!args["--dev"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/export/resolveOptions.ts"],"sourcesContent":["import { getConfig, Platform } from '@expo/config';\n\nimport { getPlatformBundlers, PlatformBundlers } from '../start/server/platformBundlers';\nimport { CommandError } from '../utils/errors';\n\nexport type Options = {\n outputDir: string;\n platforms: Platform[];\n maxWorkers?: number;\n dev: boolean;\n clear: boolean;\n minify: boolean;\n dumpAssetmap: boolean;\n dumpSourcemap: boolean;\n};\n\n/** Returns an array of platforms based on the input platform identifier and runtime constraints. */\nexport function resolvePlatformOption(\n platformBundlers: PlatformBundlers,\n platform: string = 'all'\n): Platform[] {\n const
|
|
1
|
+
{"version":3,"sources":["../../../src/export/resolveOptions.ts"],"sourcesContent":["import { getConfig, Platform } from '@expo/config';\n\nimport { getPlatformBundlers, PlatformBundlers } from '../start/server/platformBundlers';\nimport { CommandError } from '../utils/errors';\n\nexport type Options = {\n outputDir: string;\n platforms: Platform[];\n maxWorkers?: number;\n dev: boolean;\n clear: boolean;\n minify: boolean;\n dumpAssetmap: boolean;\n dumpSourcemap: boolean;\n};\n\n/** Returns an array of platforms based on the input platform identifier and runtime constraints. */\nexport function resolvePlatformOption(\n platformBundlers: PlatformBundlers,\n platform: string[] = ['all']\n): Platform[] {\n const platformsAvailable: Partial<PlatformBundlers> = Object.fromEntries(\n Object.entries(platformBundlers).filter(([, bundler]) => bundler === 'metro')\n );\n\n if (!Object.keys(platformsAvailable).length) {\n throw new CommandError(\n `No platforms are configured to use the Metro bundler in the project Expo config.`\n );\n }\n\n const assertPlatformBundler = (platform: Platform): Platform => {\n if (!platformsAvailable[platform]) {\n throw new CommandError(\n 'BAD_ARGS',\n `Platform \"${platform}\" is not configured to use the Metro bundler in the project Expo config.`\n );\n }\n\n return platform;\n };\n\n const knownPlatforms = ['android', 'ios', 'web'] as Platform[];\n const assertPlatformIsKnown = (platform: string): Platform => {\n if (!knownPlatforms.includes(platform as Platform)) {\n throw new CommandError(\n `Unsupported platform \"${platform}\". Options are: ${knownPlatforms.join(',')},all`\n );\n }\n\n return platform as Platform;\n };\n\n return (\n platform\n // Expand `all` to all available platforms.\n .map((platform) => (platform === 'all' ? Object.keys(platformsAvailable) : platform))\n .flat()\n // Remove duplicated platforms\n .filter((platform, index, list) => list.indexOf(platform) === index)\n // Assert platforms are valid\n .map((platform) => assertPlatformIsKnown(platform))\n .map((platform) => assertPlatformBundler(platform))\n );\n}\n\nexport async function resolveOptionsAsync(projectRoot: string, args: any): Promise<Options> {\n const { exp } = getConfig(projectRoot, { skipPlugins: true, skipSDKVersionRequirement: true });\n const platformBundlers = getPlatformBundlers(exp);\n\n return {\n platforms: resolvePlatformOption(platformBundlers, args['--platform']),\n outputDir: args['--output-dir'] ?? 'dist',\n minify: !args['--no-minify'],\n clear: !!args['--clear'],\n dev: !!args['--dev'],\n maxWorkers: args['--max-workers'],\n dumpAssetmap: !!args['--dump-assetmap'],\n dumpSourcemap: !!args['--dump-sourcemap'],\n };\n}\n"],"names":["resolvePlatformOption","resolveOptionsAsync","platformBundlers","platform","platformsAvailable","Object","fromEntries","entries","filter","bundler","keys","length","CommandError","assertPlatformBundler","knownPlatforms","assertPlatformIsKnown","includes","join","map","flat","index","list","indexOf","projectRoot","args","exp","getConfig","skipPlugins","skipSDKVersionRequirement","getPlatformBundlers","platforms","outputDir","minify","clear","dev","maxWorkers","dumpAssetmap","dumpSourcemap"],"mappings":"AAAA;;;;QAiBgBA,qBAAqB,GAArBA,qBAAqB;QAiDfC,mBAAmB,GAAnBA,mBAAmB;AAlEL,IAAA,OAAc,WAAd,cAAc,CAAA;AAEI,IAAA,iBAAkC,WAAlC,kCAAkC,CAAA;AAC3D,IAAA,OAAiB,WAAjB,iBAAiB,CAAA;AAcvC,SAASD,qBAAqB,CACnCE,gBAAkC,EAClCC,SAAkB,GAAG;IAAC,KAAK;CAAC,EAChB;IACZ,MAAMC,kBAAkB,GAA8BC,MAAM,CAACC,WAAW,CACtED,MAAM,CAACE,OAAO,CAACL,gBAAgB,CAAC,CAACM,MAAM,CAAC,CAAC,GAAGC,OAAO,CAAC,GAAKA,OAAO,KAAK,OAAO;IAAA,CAAC,CAC9E,AAAC;IAEF,IAAI,CAACJ,MAAM,CAACK,IAAI,CAACN,kBAAkB,CAAC,CAACO,MAAM,EAAE;QAC3C,MAAM,IAAIC,OAAY,aAAA,CACpB,CAAC,gFAAgF,CAAC,CACnF,CAAC;KACH;IAED,MAAMC,qBAAqB,GAAG,CAACV,QAAkB,GAAe;QAC9D,IAAI,CAACC,kBAAkB,CAACD,QAAQ,CAAC,EAAE;YACjC,MAAM,IAAIS,OAAY,aAAA,CACpB,UAAU,EACV,CAAC,UAAU,EAAET,QAAQ,CAAC,wEAAwE,CAAC,CAChG,CAAC;SACH;QAED,OAAOA,QAAQ,CAAC;KACjB,AAAC;IAEF,MAAMW,cAAc,GAAG;QAAC,SAAS;QAAE,KAAK;QAAE,KAAK;KAAC,AAAc,AAAC;IAC/D,MAAMC,qBAAqB,GAAG,CAACZ,QAAgB,GAAe;QAC5D,IAAI,CAACW,cAAc,CAACE,QAAQ,CAACb,QAAQ,CAAa,EAAE;YAClD,MAAM,IAAIS,OAAY,aAAA,CACpB,CAAC,sBAAsB,EAAET,QAAQ,CAAC,gBAAgB,EA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