@expo/cli 58.1.7 → 58.1.9
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/src/api/rest/wrapFetchWithUserAgent.js +1 -1
- package/build/src/command/events/eventsAsync.d.ts +2 -0
- package/build/src/command/events/eventsAsync.js +31 -0
- package/build/src/command/events/eventsAsync.js.map +1 -0
- package/build/src/command/events/help.d.ts +2 -0
- package/build/src/command/events/help.js +69 -0
- package/build/src/command/events/help.js.map +1 -0
- package/build/src/command/events/index.d.ts +2 -0
- package/build/src/command/events/index.js +59 -0
- package/build/src/command/events/index.js.map +1 -0
- package/build/src/command/events/resolveOptions.d.ts +10 -0
- package/build/src/command/events/resolveOptions.js +23 -0
- package/build/src/command/events/resolveOptions.js.map +1 -0
- package/build/src/command/index.d.ts +2 -0
- package/build/src/command/index.js +65 -0
- package/build/src/command/index.js.map +1 -0
- package/build/src/command/ps/help.d.ts +2 -0
- package/build/src/command/ps/help.js +52 -0
- package/build/src/command/ps/help.js.map +1 -0
- package/build/src/command/ps/index.d.ts +2 -0
- package/build/src/command/ps/index.js +53 -0
- package/build/src/command/ps/index.js.map +1 -0
- package/build/src/command/ps/psAsync.d.ts +2 -0
- package/build/src/command/ps/psAsync.js +49 -0
- package/build/src/command/ps/psAsync.js.map +1 -0
- package/build/src/command/ps/resolveOptions.d.ts +9 -0
- package/build/src/command/ps/resolveOptions.js +20 -0
- package/build/src/command/ps/resolveOptions.js.map +1 -0
- package/build/src/command/sessions.d.ts +4 -0
- package/build/src/command/sessions.js +80 -0
- package/build/src/command/sessions.js.map +1 -0
- package/build/src/command/utils.d.ts +5 -0
- package/build/src/command/utils.js +62 -0
- package/build/src/command/utils.js.map +1 -0
- package/build/src/index.js +28 -7
- package/build/src/index.js.map +1 -1
- package/build/src/prebuild/prebuildAsync.d.ts +1 -1
- package/build/src/prebuild/prebuildAsync.js +17 -3
- package/build/src/prebuild/prebuildAsync.js.map +1 -1
- package/build/src/prebuild/setupSwiftPM.d.ts +20 -0
- package/build/src/prebuild/setupSwiftPM.js +171 -0
- package/build/src/prebuild/setupSwiftPM.js.map +1 -0
- package/build/src/run/index.js +1 -1
- package/build/src/run/index.js.map +1 -1
- package/build/src/start/index.js +5 -2
- package/build/src/start/index.js.map +1 -1
- package/build/src/start/server/BundlerDevServer.d.ts +1 -0
- package/build/src/start/server/BundlerDevServer.js +9 -4
- package/build/src/start/server/BundlerDevServer.js.map +1 -1
- package/build/src/start/server/DevServerManager.d.ts +1 -0
- package/build/src/start/server/DevServerManager.js +21 -0
- package/build/src/start/server/DevServerManager.js.map +1 -1
- package/build/src/start/server/metro/MetroBundlerDevServer.js +39 -15
- package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
- package/build/src/start/server/metro/MetroTerminalReporter.d.ts +16 -5
- package/build/src/start/server/metro/MetroTerminalReporter.js +61 -28
- package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
- package/build/src/start/server/metro/TerminalReporter.types.d.ts +2 -0
- package/build/src/start/server/metro/debugging/AtlasPrerequisite.js +1 -1
- package/build/src/start/server/metro/dev-server/createMessageSocket.js +1 -8
- package/build/src/start/server/metro/dev-server/createMessageSocket.js.map +1 -1
- package/build/src/start/server/metro/instantiateMetro.js +7 -3
- package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
- package/build/src/start/server/metro/metroErrorInterface.d.ts +19 -3
- package/build/src/start/server/metro/metroErrorInterface.js +18 -2
- package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
- package/build/src/start/server/middleware/ExpoMiddleware.js +3 -11
- package/build/src/start/server/middleware/ExpoMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ManifestMiddleware.js +1 -8
- package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js +2 -9
- package/build/src/start/server/middleware/RuntimeRedirectMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/ServeStaticMiddleware.js +1 -8
- package/build/src/start/server/middleware/ServeStaticMiddleware.js.map +1 -1
- package/build/src/start/server/middleware/resolvePlatform.js +2 -9
- package/build/src/start/server/middleware/resolvePlatform.js.map +1 -1
- package/build/src/utils/build-cache-providers/index.js +14 -44
- package/build/src/utils/build-cache-providers/index.js.map +1 -1
- package/build/src/utils/cocoapods.js +10 -0
- package/build/src/utils/cocoapods.js.map +1 -1
- package/build/src/utils/errors.d.ts +9 -1
- package/build/src/utils/errors.js +16 -2
- package/build/src/utils/errors.js.map +1 -1
- package/build/src/utils/metadata.d.ts +15 -0
- package/build/src/utils/metadata.js +39 -0
- package/build/src/utils/metadata.js.map +1 -0
- package/build/src/utils/nodeEnv.js +2 -0
- package/build/src/utils/nodeEnv.js.map +1 -1
- package/build/src/utils/telemetry/clients/FetchClient.js +1 -1
- package/build/src/utils/telemetry/utils/context.js +1 -1
- package/package.json +20 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["start/server/metro/metroErrorInterface.ts"],"sourcesContent":[null],"names":["IS_METRO_BUNDLE_ERROR_SYMBOL","attachImportStackToRootMessage","dropStackIfContainsCodeFrame","getErrorOverlayHtmlAsync","getStackAsFormattedLog","likelyContainsCodeFrame","logMetroError","logMetroErrorAsync","logMetroErrorWithStack","nearestImportStack","isDebug","env","EXPO_DEBUG","fill","width","Array","join","formatPaths","config","filePath","chalk","reset","dim","line","col","filter","Boolean","projectRoot","stack","codeFrame","error","SilentError","Log","log","red","message","CommandError","showCollapsedFrames","logs","containsCodeFrame","maxWarningLineLength","Math","max","process","stdout","columns","lineText","content","lines","split","title","path","basename","fileName","push","bold","isPreviewTooLong","some","length","column","location","previewLine","cursorLine","formattedPath","row","rangeWindow","round","minBounds","maxBounds","min","slice","isFallback","stackProps","map","frame","methodName","subtitle","getStackFormattedLocation","collapse","isInternalBytecode","stackLines","backupStackLines","forEach","shouldShow","position","terminalLink","isSupported","lineItem","gray","isMetroRuntime","test","displayStack","Symbol","
|
|
1
|
+
{"version":3,"sources":["start/server/metro/metroErrorInterface.ts"],"sourcesContent":[null],"names":["HAS_LOGGED_SYMBOL","IS_METRO_BUNDLE_ERROR_SYMBOL","attachImportStackToRootMessage","dropStackIfContainsCodeFrame","getErrorOverlayHtmlAsync","getStackAsFormattedLog","likelyContainsCodeFrame","logMetroError","logMetroErrorAsync","logMetroErrorWithStack","nearestImportStack","isDebug","env","EXPO_DEBUG","event","events","fill","width","Array","join","formatPaths","config","filePath","chalk","reset","dim","line","col","filter","Boolean","projectRoot","stack","codeFrame","error","SilentError","Log","log","red","message","CommandError","showCollapsedFrames","logs","containsCodeFrame","maxWarningLineLength","Math","max","process","stdout","columns","lineText","content","lines","split","title","path","basename","fileName","push","bold","isPreviewTooLong","some","length","column","location","previewLine","cursorLine","formattedPath","row","rangeWindow","round","minBounds","maxBounds","min","slice","isFallback","stackProps","map","frame","methodName","subtitle","getStackFormattedLocation","collapse","isInternalBytecode","stackLines","backupStackLines","forEach","shouldShow","position","terminalLink","isSupported","lineItem","gray","isMetroRuntime","test","displayStack","Symbol","parseErrorStack","LogBoxLog","level","substitutions","isComponentError","category","componentStack","Promise","res","symbolicate","symbolicated","logFromError","data","parseWebBuildErrors","routerRoot","stripAnsi","logBoxContext","selectedLogIndex","isDisabled","serializedLogBox","JSON","stringify","replace","html","errorOverlayEntry","createMetroEndpointAsync","resolveFrom","mode","platform","minify","optimize","usedExports","baseUrl","isExporting","reactCompiler","escapedSrc","htmlWithJs","isArray","serverRoot","getMetroServerRoot","parse","file","startsWith","includes","canParse","relative","url","URL","err","Error","clean","stripVTControlCharacters","importStack","root","undefined","_expoImportStack","cause"],"mappings":"AAAA;;;;;CAKC;;;;;;;;;;;;;;;;;;;;;;;;QA0NYA;eAAAA;;QADAC;eAAAA;;QAkMAC;eAAAA;;QA1BGC;eAAAA;;QAnGMC;eAAAA;;QA7MNC;eAAAA;;QA6TAC;eAAAA;;QAlLMC;eAAAA;;QA+CAC;eAAAA;;QA9NAC;eAAAA;;QAiYTC;e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IAC7B,OAAO;QACL,OAAO7I,mBAAmBsI,IAAIQ,KAAK,EAAEH;IACvC;AACF;AAEA,SAASnE,mBAAmBL,KAAiB;IAC3C,OAAOA,MAAM4D,IAAI,EAAEE,SAAS,0BAA0B;AACxD"}
|
|
@@ -20,13 +20,6 @@ _export(exports, {
|
|
|
20
20
|
return disableResponseCache;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
function _url() {
|
|
24
|
-
const data = require("url");
|
|
25
|
-
_url = function() {
|
|
26
|
-
return data;
|
|
27
|
-
};
|
|
28
|
-
return data;
|
|
29
|
-
}
|
|
30
23
|
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../../../log"));
|
|
31
24
|
function _getRequireWildcardCache(nodeInterop) {
|
|
32
25
|
if (typeof WeakMap !== "function") return null;
|
|
@@ -83,12 +76,11 @@ class ExpoMiddleware {
|
|
|
83
76
|
if (!req.url) {
|
|
84
77
|
return false;
|
|
85
78
|
}
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
if (!parsed.pathname) {
|
|
79
|
+
const pathname = URL.parse(req.url, 'file:')?.pathname;
|
|
80
|
+
if (!pathname) {
|
|
89
81
|
return false;
|
|
90
82
|
}
|
|
91
|
-
return this.supportedPaths.includes(
|
|
83
|
+
return this.supportedPaths.includes(pathname);
|
|
92
84
|
}
|
|
93
85
|
/** Create a server middleware handler. */ getHandler() {
|
|
94
86
|
const internalMiddleware = async (req, res, next)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["start/server/middleware/ExpoMiddleware.ts"],"sourcesContent":[null],"names":["ExpoMiddleware","disableResponseCache","projectRoot","supportedPaths","shouldHandleRequest","req","url","
|
|
1
|
+
{"version":3,"sources":["start/server/middleware/ExpoMiddleware.ts"],"sourcesContent":[null],"names":["ExpoMiddleware","disableResponseCache","projectRoot","supportedPaths","shouldHandleRequest","req","url","pathname","URL","parse","includes","getHandler","internalMiddleware","res","next","handleRequestAsync","error","Log","exception","statusCode","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,SAAS,CAAC,iBAAiB;IAC/Bb,IAAIa,SAAS,CAAC,WAAW;IACzBb,IAAIa,SAAS,CAAC,UAAU;IACxB,OAAOb;AACT"}
|
|
@@ -48,13 +48,6 @@ function _nodepath() {
|
|
|
48
48
|
};
|
|
49
49
|
return data;
|
|
50
50
|
}
|
|
51
|
-
function _url() {
|
|
52
|
-
const data = require("url");
|
|
53
|
-
_url = function() {
|
|
54
|
-
return data;
|
|
55
|
-
};
|
|
56
|
-
return data;
|
|
57
|
-
}
|
|
58
51
|
const _user = require("../../../api/user/user");
|
|
59
52
|
const _exportHermes = require("../../../export/exportHermes");
|
|
60
53
|
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../../../log"));
|
|
@@ -258,7 +251,7 @@ class ManifestMiddleware extends _ExpoMiddleware.ExpoMiddleware {
|
|
|
258
251
|
if (this.options.isNativeWebpack) {
|
|
259
252
|
// When using our custom dev server, just do assets normally
|
|
260
253
|
// without the `assets/` subpath redirect.
|
|
261
|
-
return shouldUseRelativeManifestUrls ? toAssetUrlPath(assetPath) :
|
|
254
|
+
return shouldUseRelativeManifestUrls ? toAssetUrlPath(assetPath) : bundleUrl.match(/^https?:\/\/.*?\//)[0] + toAssetUrlPath(assetPath);
|
|
262
255
|
}
|
|
263
256
|
const assetUrlPath = 'assets/' + toAssetUrlPath(assetPath);
|
|
264
257
|
return shouldUseRelativeManifestUrls ? assetUrlPath : bundleUrl.match(/^https?:\/\/.*?\//)[0] + assetUrlPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["start/server/middleware/ManifestMiddleware.ts"],"sourcesContent":[null],"names":["DEVELOPER_TOOL","ManifestMiddleware","toAssetUrlPath","assetPath","posix","normalize","toPosixPath","replace","ExpoMiddleware","initialProjectConfig","platformBundlers","projectRoot","options","getConfig","getPlatformBundlers","exp","_resolveProjectSettingsAsync","platform","hostname","protocol","forwarded","projectConfig","mainModuleName","resolveMainModuleName","pkg","isHermesEnabled","isEnableHermesManaged","user","getUserAsync","username","getActorDisplayName","shouldUseRelativeManifestUrls","viaForwardedHeader","hostUri","authority","constructUrl","scheme","expoGoConfig","getExpoGoConfig","debuggerHost","undefined","absoluteBundleUrl","_getBundleUrl","engine","baseUrl","getBaseUrlFromExpoConfig","asyncRoutes","getAsyncRoutesFromExpoConfig","mode","routerRoot","getRouterDirectoryModuleIdWithManifest","reactCompiler","experiments","mutateManifestWithAssetsAsync","bundleUrl","toPathRelativeUrl","props","isNativeWebpack","entry","resolveRelativeEntryPoint","manifestDebugEvent","path","saveDevicesAsync","req","deviceIds","headers","ProjectDevices","catch","e","Log","exception","isExporting","createBundleUrlPath","minify","lazy","env","EXPO_NO_METRO_LAZY","bytecode","developer","tool","packagerOpts","dev","url","parsedUrl","URL","pathname","search","hash","manifest","resolveManifestAssets","resolver","
|
|
1
|
+
{"version":3,"sources":["start/server/middleware/ManifestMiddleware.ts"],"sourcesContent":[null],"names":["DEVELOPER_TOOL","ManifestMiddleware","toAssetUrlPath","assetPath","posix","normalize","toPosixPath","replace","ExpoMiddleware","initialProjectConfig","platformBundlers","projectRoot","options","getConfig","getPlatformBundlers","exp","_resolveProjectSettingsAsync","platform","hostname","protocol","forwarded","projectConfig","mainModuleName","resolveMainModuleName","pkg","isHermesEnabled","isEnableHermesManaged","user","getUserAsync","username","getActorDisplayName","shouldUseRelativeManifestUrls","viaForwardedHeader","hostUri","authority","constructUrl","scheme","expoGoConfig","getExpoGoConfig","debuggerHost","undefined","absoluteBundleUrl","_getBundleUrl","engine","baseUrl","getBaseUrlFromExpoConfig","asyncRoutes","getAsyncRoutesFromExpoConfig","mode","routerRoot","getRouterDirectoryModuleIdWithManifest","reactCompiler","experiments","mutateManifestWithAssetsAsync","bundleUrl","toPathRelativeUrl","props","isNativeWebpack","entry","resolveRelativeEntryPoint","manifestDebugEvent","path","saveDevicesAsync","req","deviceIds","headers","ProjectDevices","catch","e","Log","exception","isExporting","createBundleUrlPath","minify","lazy","env","EXPO_NO_METRO_LAZY","bytecode","developer","tool","packagerOpts","dev","url","parsedUrl","URL","pathname","search","hash","manifest","resolveManifestAssets","resolver","match","assetUrlPath","resolveGoogleServicesFile","getWebBundleUrl","createBundleUrlPathFromExpoConfig","handleWebRequestAsync","res","setHeader","end","getSingleHtmlTemplateAsync","createTemplateHtmlFromExpoConfigAsync","scripts","checkBrowserRequestAsync","next","web","platforms","includes","parsePlatformHeader","isExpoRouterApp","output","handleRequestAsync","getParsedHeaders","response","_getManifestResponseAsync","respond"],"mappings":";;;;;;;;;;;;;;;QA6DaA;eAAAA;;QAwBSC;eAAAA;;;;yBApFI;;;;;;;yBACgB;;;;;;;yBAClB;;;;;;;yBACF;;;;;;sBAE4B;8BACZ;6DACjB;qBACD;0BACQ;iEACI;wBAEwC;kCAEpC;6BACkB;gCACvB;wBACI;8BAM5B;+BAC0D;iCAG7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiC7B,MAAMD,iBAAiB;AAE9B;;;;;;CAMC,GACD,SAASE,eAAeC,SAAiB;IACvC,OAAOC,iBAAK,CAACC,SAAS,CAACC,IAAAA,qBAAW,EAACH,YAAYI,OAAO,CAAC,OAAO;AAChE;AAaO,MAAeN,2BAEZO,8BAAc;;;IACdC,qBAAoC;IACpCC,iBAAmC;IAE3C,YACE,AAAUC,WAAmB,EAC7B,AAAUC,OAAkC,CAC5C;QACA,KAAK,CACHD,aACA;;OAEC,GACD;YAAC;YAAK;YAAa;SAAa,QARxBA,cAAAA,kBACAC,UAAAA;QASV,IAAI,CAACH,oBAAoB,GAAGI,IAAAA,mBAAS,EAACF;QACtC,IAAI,CAACD,gBAAgB,GAAGI,IAAAA,qCAAmB,EAACH,aAAa,IAAI,CAACF,oBAAoB,CAACM,GAAG;IACxF;IAEA,yBAAyB,GACzB,MAAaC,6BAA6B,EACxCC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EACRC,SAAS,EAIV,EAAoC;QACnC,kBAAkB;QAClB,MAAMC,gBAAgBR,IAAAA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Q,CAAC,IAAI,CAAClG,oBAAoB,CAACM,GAAG,CAAC0F,GAAG,EAAEK,UAAU,KAC3E;oBACA,oEAAoE;oBACpEN;oBACA,OAAO;gBACT,OAAO;oBACL,MAAM,IAAI,CAACR,qBAAqB,CAACjC,KAAKkC;oBACtC,OAAO;gBACT;YACF;QACF;QACA,OAAO;IACT;IAEA,MAAMc,mBACJhD,GAAkB,EAClBkC,GAAmB,EACnBO,IAAgB,EACD;QACf,kFAAkF;QAClF,IAAI,MAAM,IAAI,CAACD,wBAAwB,CAACxC,KAAKkC,KAAKO,OAAO;YACvD;QACF;QAEA,kCAAkC;QAClC,MAAM,IAAI,CAAC1C,gBAAgB,CAACC;QAE5B,oBAAoB;QACpB,MAAMnD,UAAU,IAAI,CAACoG,gBAAgB,CAACjD;QAEtC,MAAMkD,WAAW,MAAM,IAAI,CAACC,yBAAyB,CAACtG;QACtD,MAAMuG,IAAAA,eAAO,EAAClB,KAAKgB;IACrB;AACF"}
|
|
@@ -20,13 +20,6 @@ _export(exports, {
|
|
|
20
20
|
return RuntimeRedirectMiddleware;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
function _url() {
|
|
24
|
-
const data = require("url");
|
|
25
|
-
_url = function() {
|
|
26
|
-
return data;
|
|
27
|
-
};
|
|
28
|
-
return data;
|
|
29
|
-
}
|
|
30
23
|
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../../../log"));
|
|
31
24
|
const _ExpoMiddleware = require("./ExpoMiddleware");
|
|
32
25
|
const _resolveForwarded = require("./resolveForwarded");
|
|
@@ -82,8 +75,8 @@ class RuntimeRedirectMiddleware extends _ExpoMiddleware.ExpoMiddleware {
|
|
|
82
75
|
]), this.projectRoot = projectRoot, this.options = options;
|
|
83
76
|
}
|
|
84
77
|
async handleRequestAsync(req, res) {
|
|
85
|
-
const
|
|
86
|
-
const isDevClient = query
|
|
78
|
+
const query = URL.parse(req.url, 'file:')?.searchParams;
|
|
79
|
+
const isDevClient = query?.get('choice') === 'expo-dev-client';
|
|
87
80
|
const platform = (0, _resolvePlatform.parsePlatformHeader)(req) ?? (0, _resolvePlatform.resolvePlatformFromUserAgentHeader)(req);
|
|
88
81
|
(0, _resolvePlatform.assertMissingRuntimePlatform)(platform);
|
|
89
82
|
(0, _resolvePlatform.assertRuntimePlatform)(platform);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["start/server/middleware/RuntimeRedirectMiddleware.ts"],"sourcesContent":[null],"names":["LinkEndpoint","RuntimeRedirectMiddleware","ExpoMiddleware","projectRoot","options","handleRequestAsync","req","res","query","parse","url","isDevClient","platform","parsePlatformHeader","resolvePlatformFromUserAgentHeader","assertMissingRuntimePlatform","assertRuntimePlatform","runtime","onDeepLink","redirect","getLocation","forwarded","parseForwardedRequestInfo","Log","warn","statusCode","end","setHeader","disableResponseCache"],"mappings":";;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["start/server/middleware/RuntimeRedirectMiddleware.ts"],"sourcesContent":[null],"names":["LinkEndpoint","RuntimeRedirectMiddleware","ExpoMiddleware","projectRoot","options","handleRequestAsync","req","res","query","URL","parse","url","searchParams","isDevClient","get","platform","parsePlatformHeader","resolvePlatformFromUserAgentHeader","assertMissingRuntimePlatform","assertRuntimePlatform","runtime","onDeepLink","redirect","getLocation","forwarded","parseForwardedRequestInfo","Log","warn","statusCode","end","setHeader","disableResponseCache"],"mappings":";;;;;;;;;;;;;;;QAaaA;eAAAA;;QAUAC;eAAAA;;;6DAvBQ;gCACgC;kCAEX;iCAOnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMD,eAAe;AAUrB,MAAMC,kCAAkCC,8BAAc;;;IAC3D,YACE,AAAUC,WAAmB,EAC7B,AAAUC,OAMT,CACD;QACA,KAAK,CAACD,aAAa;YAACH;SAAa,QATvBG,cAAAA,kBACAC,UAAAA;IASZ;IAEA,MAAMC,mBAAmBC,GAAkB,EAAEC,GAAmB,EAAiB;QAC/E,MAAMC,QAAQC,IAAIC,KAAK,CAACJ,IAAIK,GAAG,EAAG,UAAUC;QAC5C,MAAMC,cAAcL,OAAOM,IAAI,cAAc;QAC7C,MAAMC,WAAWC,IAAAA,oCAAmB,EAACV,QAAQW,IAAAA,mDAAkC,EAACX;QAChFY,IAAAA,6CAA4B,EAACH;QAC7BI,IAAAA,sCAAqB,EAACJ;QACtB,MAAMK,UAAUP,cAAc,WAAW;QAEzC,IAAI,CAACT,OAAO,CAACiB,UAAU,GAAG;YAAED;YAASL;QAAS;QAE9C,MAAMO,WAAW,IAAI,CAAClB,OAAO,CAACmB,WAAW,CAAC;YACxCH;YACAI,WAAWC,IAAAA,2CAAyB,EAACnB;QACvC;QACA,IAAI,CAACgB,UAAU;YACbI,KAAIC,IAAI,CACN,CAAC,0EAA0E,EAAEP,QAAQ,gBAAgB,EAAEL,SAAS,CAAC,CAAC;YAEpHR,IAAIqB,UAAU,GAAG;YACjBrB,IAAIsB,GAAG;YACP;QACF;QACAtB,IAAIuB,SAAS,CAAC,YAAYR;QAE1B,kBAAkB;QAClBS,IAAAA,oCAAoB,EAACxB;QAErB,uBAAuB;QACvBA,IAAIqB,UAAU,GAAG;QACjBrB,IAAIsB,GAAG;IACT;AACF"}
|
|
@@ -15,13 +15,6 @@ function _send() {
|
|
|
15
15
|
};
|
|
16
16
|
return data;
|
|
17
17
|
}
|
|
18
|
-
function _url() {
|
|
19
|
-
const data = require("url");
|
|
20
|
-
_url = function() {
|
|
21
|
-
return data;
|
|
22
|
-
};
|
|
23
|
-
return data;
|
|
24
|
-
}
|
|
25
18
|
const _publicFolder = require("../../../export/publicFolder");
|
|
26
19
|
const _resolvePlatform = require("./resolvePlatform");
|
|
27
20
|
function _interop_require_default(obj) {
|
|
@@ -48,7 +41,7 @@ class ServeStaticMiddleware {
|
|
|
48
41
|
if (platform && platform !== 'web') {
|
|
49
42
|
return next();
|
|
50
43
|
}
|
|
51
|
-
const pathname =
|
|
44
|
+
const pathname = URL.parse(req.url, 'file:')?.pathname;
|
|
52
45
|
if (!pathname) {
|
|
53
46
|
return next();
|
|
54
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["start/server/middleware/ServeStaticMiddleware.ts"],"sourcesContent":[null],"names":["ServeStaticMiddleware","projectRoot","getHandler","publicPath","getPublicFolderPath","opts","root","req","res","next","url","method","platform","parsePlatformHeader","pathname","parse","stream","send","forwardError","on","onFile","error","err","statusCode","pipe"],"mappings":";;;;+
|
|
1
|
+
{"version":3,"sources":["start/server/middleware/ServeStaticMiddleware.ts"],"sourcesContent":[null],"names":["ServeStaticMiddleware","projectRoot","getHandler","publicPath","getPublicFolderPath","opts","root","req","res","next","url","method","platform","parsePlatformHeader","pathname","URL","parse","stream","send","forwardError","on","onFile","error","err","statusCode","pipe"],"mappings":";;;;+BASaA;;;eAAAA;;;;gEATI;;;;;;8BAEmB;iCACA;;;;;;AAM7B,MAAMA;;IACX,YAAY,AAAQC,WAAmB,CAAE;aAArBA,cAAAA;IAAsB;IAC1CC,aAAa;QACX,MAAMC,aAAaC,IAAAA,iCAAmB,EAAC,IAAI,CAACH,WAAW;QAEvD,MAAMI,OAAO;YACXC,MAAMH;QACR;QACA,OAAO,CAACI,KAAoBC,KAAqBC;YAC/C,IAAI,CAACF,KAAKG,OAAQH,IAAII,MAAM,KAAK,SAASJ,IAAII,MAAM,KAAK,QAAS;gBAChE,OAAOF;YACT;YAEA,MAAMG,WAAWC,IAAAA,oCAAmB,EAACN;YACrC,6BAA6B;YAC7B,IAAIK,YAAYA,aAAa,OAAO;gBAClC,OAAOH;YACT;YAEA,MAAMK,WAAWC,IAAIC,KAAK,CAACT,IAAIG,GAAG,EAAE,UAAUI;YAC9C,IAAI,CAACA,UAAU;gBACb,OAAOL;YACT;YAEA,MAAMQ,SAASC,IAAAA,eAAI,EAACX,KAAKO,UAAUT;YAEnC,oCAAoC;YACpC,IAAIc,eAAe;YACnBF,OAAOG,EAAE,CAAC,QAAQ,SAASC;gBACzB,gDAAgD;gBAChDF,eAAe;YACjB;YAEA,iBAAiB;YACjBF,OAAOG,EAAE,CAAC,SAAS,SAASE,MAAMC,GAAQ;gBACxC,IAAIJ,gBAAgB,CAAEI,CAAAA,IAAIC,UAAU,GAAG,GAAE,GAAI;oBAC3Cf,KAAKc;oBACL;gBACF;gBAEAd;YACF;YAEA,OAAO;YACPQ,OAAOQ,IAAI,CAACjB;QACd;IACF;AACF"}
|
|
@@ -35,17 +35,10 @@ function _platforms() {
|
|
|
35
35
|
};
|
|
36
36
|
return data;
|
|
37
37
|
}
|
|
38
|
-
function _url() {
|
|
39
|
-
const data = require("url");
|
|
40
|
-
_url = function() {
|
|
41
|
-
return data;
|
|
42
|
-
};
|
|
43
|
-
return data;
|
|
44
|
-
}
|
|
45
38
|
const _errors = require("../../../utils/errors");
|
|
46
39
|
function parsePlatformHeader(req) {
|
|
47
|
-
const
|
|
48
|
-
const platform =
|
|
40
|
+
const searchParams = URL.parse(req.url, 'file:')?.searchParams;
|
|
41
|
+
const platform = searchParams?.get('platform') || req.headers['expo-platform'] || req.headers['exponent-platform'];
|
|
49
42
|
return (Array.isArray(platform) ? platform[0] : platform) ?? null;
|
|
50
43
|
}
|
|
51
44
|
function resolvePlatformFromUserAgentHeader(req) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["start/server/middleware/resolvePlatform.ts"],"sourcesContent":[null],"names":["assertMissingRuntimePlatform","assertRuntimePlatform","parsePlatformHeader","resolvePlatformFromUserAgentHeader","req","
|
|
1
|
+
{"version":3,"sources":["start/server/middleware/resolvePlatform.ts"],"sourcesContent":[null],"names":["assertMissingRuntimePlatform","assertRuntimePlatform","parsePlatformHeader","resolvePlatformFromUserAgentHeader","req","searchParams","URL","parse","url","platform","get","headers","Array","isArray","userAgent","match","CommandError","stringifiedPlatform","String","KNOWN_PLATFORMS","includes"],"mappings":";;;;;;;;;;;;;;;;;QA2CgBA;eAAAA;;QAUAC;eAAAA;;QApCAC;eAAAA;;QAUAC;eAAAA;;;;yBA1BgB;;;;;;wBAEH;AActB,SAASD,oBAAoBE,GAAkB;IACpD,MAAMC,eAAeC,IAAIC,KAAK,CAACH,IAAII,GAAG,EAAG,UAAUH;IACnD,MAAMI,WACJJ,cAAcK,IAAI,eAClBN,IAAIO,OAAO,CAAC,gBAAgB,IAC5BP,IAAIO,OAAO,CAAC,oBAAoB;IAClC,OAAO,AAACC,CAAAA,MAAMC,OAAO,CAACJ,YAAYA,QAAQ,CAAC,EAAE,GAAGA,QAAO,KAAM;AAC/D;AAGO,SAASN,mCAAmCC,GAAkB;IACnE,IAAIK,WAAW;IACf,MAAMK,YAAYV,IAAIO,OAAO,CAAC,aAAa;IAC3C,IAAIG,WAAWC,MAAM,aAAa;QAChCN,WAAW;IACb;IACA,IAAIK,WAAWC,MAAM,yBAAyB;QAC5CN,WAAW;IACb;IACA,IAAIK,WAAWC,MAAM,iBAAiB;QACpCN,WAAW;IACb;IACA,OAAOA;AACT;AAGO,SAAST,6BAA6BS,QAAc;IACzD,IAAI,CAACA,UAAU;QACb,MAAM,IAAIO,oBAAY,CACpB,mBACA,CAAC,iEAAiE,CAAC;IAEvE;AACF;AAGO,SAASf,sBAAsBQ,QAAgB;IACpD,MAAMQ,sBAAsBC,OAAOT;IACnC,IAAI,CAAC,AAACU,4BAAe,CAAuBC,QAAQ,CAACH,sBAAsB;QACzE,MAAM,IAAID,oBAAY,CACpB,mBACA,CAAC,yEAAyE,EAAEP,SAAS,CAAC,CAAC;IAE3F;AACF"}
|
|
@@ -28,23 +28,9 @@ _export(exports, {
|
|
|
28
28
|
return uploadBuildCache;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
function
|
|
32
|
-
const data =
|
|
33
|
-
|
|
34
|
-
return data;
|
|
35
|
-
};
|
|
36
|
-
return data;
|
|
37
|
-
}
|
|
38
|
-
function _path() {
|
|
39
|
-
const data = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
40
|
-
_path = function() {
|
|
41
|
-
return data;
|
|
42
|
-
};
|
|
43
|
-
return data;
|
|
44
|
-
}
|
|
45
|
-
function _resolvefrom() {
|
|
46
|
-
const data = /*#__PURE__*/ _interop_require_default(require("resolve-from"));
|
|
47
|
-
_resolvefrom = function() {
|
|
31
|
+
function _requireutils() {
|
|
32
|
+
const data = require("@expo/require-utils");
|
|
33
|
+
_requireutils = function() {
|
|
48
34
|
return data;
|
|
49
35
|
};
|
|
50
36
|
return data;
|
|
@@ -54,11 +40,6 @@ const _events = require("../../run/events");
|
|
|
54
40
|
const _ensureDependenciesAsync = require("../../start/doctor/dependencies/ensureDependenciesAsync");
|
|
55
41
|
const _errors = require("../errors");
|
|
56
42
|
const _helpers = require("./helpers");
|
|
57
|
-
function _interop_require_default(obj) {
|
|
58
|
-
return obj && obj.__esModule ? obj : {
|
|
59
|
-
default: obj
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
43
|
function _getRequireWildcardCache(nodeInterop) {
|
|
63
44
|
if (typeof WeakMap !== "function") return null;
|
|
64
45
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -118,10 +99,8 @@ const resolveBuildCacheProvider = async (provider, projectRoot)=>{
|
|
|
118
99
|
}
|
|
119
100
|
]
|
|
120
101
|
});
|
|
121
|
-
// We need to manually load dependencies installed on the fly
|
|
122
|
-
const plugin = await manuallyLoadDependency(projectRoot, 'eas-build-cache-provider');
|
|
123
102
|
return {
|
|
124
|
-
plugin:
|
|
103
|
+
plugin: resolvePluginFunction(projectRoot, 'eas-build-cache-provider'),
|
|
125
104
|
options: {}
|
|
126
105
|
};
|
|
127
106
|
} catch (error) {
|
|
@@ -239,20 +218,26 @@ function importFingerprintForDev(projectRoot) {
|
|
|
239
218
|
*/ function resolvePluginFilePathForModule(projectRoot, pluginReference) {
|
|
240
219
|
if ((0, _helpers.moduleNameIsDirectFileReference)(pluginReference)) {
|
|
241
220
|
// Only resolve `./file.js`, `package/file.js`, `@org/package/file.js`
|
|
242
|
-
const pluginScriptFile =
|
|
221
|
+
const pluginScriptFile = (0, _requireutils().resolveFrom)(projectRoot, pluginReference);
|
|
243
222
|
if (pluginScriptFile) {
|
|
244
223
|
return pluginScriptFile;
|
|
245
224
|
}
|
|
246
225
|
} else if ((0, _helpers.moduleNameIsPackageReference)(pluginReference)) {
|
|
247
|
-
// Try to
|
|
248
|
-
|
|
226
|
+
// Try to resolve the `main` entry as provider plugin.
|
|
227
|
+
// Skip the extension/index probes, Node's resolver handles `main`.
|
|
228
|
+
const packageMainEntry = (0, _requireutils().resolveFrom)(projectRoot, pluginReference, {
|
|
229
|
+
extensions: []
|
|
230
|
+
});
|
|
231
|
+
if (packageMainEntry) {
|
|
232
|
+
return packageMainEntry;
|
|
233
|
+
}
|
|
249
234
|
}
|
|
250
235
|
throw new Error(`Failed to resolve provider plugin for module "${pluginReference}" relative to "${projectRoot}". Do you have node modules installed?`);
|
|
251
236
|
}
|
|
252
237
|
function resolvePluginFunction(projectRoot, pluginReference) {
|
|
253
238
|
const pluginFile = resolvePluginFilePathForModule(projectRoot, pluginReference);
|
|
254
239
|
try {
|
|
255
|
-
let plugin =
|
|
240
|
+
let plugin = (0, _requireutils().loadModuleSync)(pluginFile);
|
|
256
241
|
if (plugin?.default != null) {
|
|
257
242
|
plugin = plugin.default;
|
|
258
243
|
}
|
|
@@ -270,20 +255,5 @@ function resolvePluginFunction(projectRoot, pluginReference) {
|
|
|
270
255
|
throw error;
|
|
271
256
|
}
|
|
272
257
|
}
|
|
273
|
-
async function manuallyLoadDependency(projectRoot, packageName) {
|
|
274
|
-
const possiblePaths = [
|
|
275
|
-
_path().default.join(projectRoot, 'node_modules'),
|
|
276
|
-
...require.resolve.paths(packageName) ?? []
|
|
277
|
-
];
|
|
278
|
-
const nodeModulesFolder = possiblePaths?.find((p)=>{
|
|
279
|
-
const packagePath = _path().default.join(p, packageName);
|
|
280
|
-
return _fs().default.existsSync(packagePath);
|
|
281
|
-
});
|
|
282
|
-
if (!nodeModulesFolder) {
|
|
283
|
-
throw new Error(`Package ${packageName} not found in ${possiblePaths}`);
|
|
284
|
-
}
|
|
285
|
-
const { main } = await import(_path().default.join(nodeModulesFolder, packageName, 'package.json'));
|
|
286
|
-
return import(_path().default.join(nodeModulesFolder, packageName, main));
|
|
287
|
-
}
|
|
288
258
|
|
|
289
259
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/build-cache-providers/index.ts"],"sourcesContent":[null],"names":["resolveBuildCache","resolveBuildCacheProvider","resolvePluginFunction","uploadBuildCache","provider","projectRoot","ensureDependenciesAsync","isProjectMutable","installMessage","warningMessage","requiredPackages","pkg","file","dev","plugin","
|
|
1
|
+
{"version":3,"sources":["utils/build-cache-providers/index.ts"],"sourcesContent":[null],"names":["resolveBuildCache","resolveBuildCacheProvider","resolvePluginFunction","uploadBuildCache","provider","projectRoot","ensureDependenciesAsync","isProjectMutable","installMessage","warningMessage","requiredPackages","pkg","file","dev","plugin","options","error","CommandError","Log","warn","message","undefined","Error","platform","runOptions","fingerprintHash","calculateFingerprintHashAsync","resolveRemoteBuildCache","buildPath","debugEvent","uploadRemoteBuildCache","calculateFingerprintHash","Fingerprint","importFingerprintForDev","fingerprint","createFingerprintAsync","hash","require","resolve","paths","code","resolvePluginFilePathForModule","pluginReference","moduleNameIsDirectFileReference","pluginScriptFile","resolveFrom","moduleNameIsPackageReference","packageMainEntry","extensions","pluginFile","loadModuleSync","default","SyntaxError"],"mappings":";;;;;;;;;;;;;;;;;QA6DsBA;eAAAA;;QA/CTC;eAAAA;;QAyMGC;eAAAA;;QAxHMC;eAAAA;;;;yBAzFsB;;;;;;6DAEvB;wBACM;yCACa;wBACX;yBACiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvE,MAAMF,4BAA4B,OACvCG,UACAC;IAEA,IAAI,CAACD,UAAU;QACb;IACF;IAEA,IAAIA,aAAa,OAAO;QACtB,IAAI;YACF,MAAME,IAAAA,gDAAuB,EAACD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AIE,kBAAkB;YACpB,OAAOA;QACT;IACF,OAAO,IAAIE,IAAAA,qCAA4B,EAACJ,kBAAkB;QACxD,sDAAsD;QACtD,mEAAmE;QACnE,MAAMK,mBAAmBF,IAAAA,2BAAW,EAACxC,aAAaqC,iBAAiB;YAAEM,YAAY,EAAE;QAAC;QACpF,IAAID,kBAAkB;YACpB,OAAOA;QACT;IACF;IAEA,MAAM,IAAIzB,MACR,CAAC,8CAA8C,EAAEoB,gBAAgB,eAAe,EAAErC,YAAY,sCAAsC,CAAC;AAEzI;AAGO,SAASH,sBACdG,WAAmB,EACnBqC,eAAuB;IAEvB,MAAMO,aAAaR,+BAA+BpC,aAAaqC;IAE/D,IAAI;QACF,IAAI5B,SAASoC,IAAAA,8BAAc,EAACD;QAC5B,IAAInC,QAAQqC,WAAW,MAAM;YAC3BrC,SAASA,OAAOqC,OAAO;QACzB;QAEA,IACE,OAAOrC,WAAW,YACjB,OAAOA,OAAOa,uBAAuB,KAAK,cACzC,OAAOb,OAAOd,iBAAiB,KAAK,cACrC,OAAOc,OAAOgB,sBAAsB,KAAK,cACxC,OAAOhB,OAAOX,gBAAgB,KAAK,YACrC;YACA,MAAM,IAAImB,MAAM,CAAC;6BACM,EAAEoB,gBAAgB;;MAEzC,CAAC;QACH;QACA,OAAO5B;IACT,EAAE,OAAOE,OAAO;QACd,IAAIA,iBAAiBoC,aAAa;QAChC,sEAAsE;QACxE;QACA,MAAMpC;IACR;AACF"}
|
|
@@ -67,6 +67,7 @@ function _path() {
|
|
|
67
67
|
return data;
|
|
68
68
|
}
|
|
69
69
|
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../log"));
|
|
70
|
+
const _setupSwiftPM = require("../prebuild/setupSwiftPM");
|
|
70
71
|
const _updatePackageJson = require("../prebuild/updatePackageJson");
|
|
71
72
|
const _dir = require("./dir");
|
|
72
73
|
const _env = require("./env");
|
|
@@ -227,6 +228,15 @@ function isPodFolderCreated(projectRoot) {
|
|
|
227
228
|
return _fs().default.existsSync(podFolderPath);
|
|
228
229
|
}
|
|
229
230
|
async function maybePromptToSyncPodsAsync(projectRoot) {
|
|
231
|
+
const { exp } = (0, _config().getConfig)(projectRoot, {
|
|
232
|
+
skipSDKVersionRequirement: true
|
|
233
|
+
});
|
|
234
|
+
if ((0, _setupSwiftPM.isSwiftPMEnabled)(exp)) {
|
|
235
|
+
const skipping = (0, _chalk().default)`Skipping CocoaPods because {bold experiments.swiftPackageManager} is enabled in the app config.`;
|
|
236
|
+
_log.log((0, _setupSwiftPM.getSwiftPMMarkerPath)(projectRoot) ? skipping : (0, _chalk().default)`${skipping} The iOS project still uses CocoaPods. Run {bold npx expo prebuild} to switch it to Swift Package Manager.`);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
(0, _setupSwiftPM.assertNoSwiftPMMarker)(projectRoot);
|
|
230
240
|
if (!doesProjectUseCocoaPods(projectRoot)) {
|
|
231
241
|
// Project does not use CocoaPods
|
|
232
242
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/cocoapods.ts"],"sourcesContent":[null],"names":["hasPackageJsonDependencyListChangedAsync","installCocoaPodsAsync","maybePromptToSyncPodsAsync","PROJECT_PREBUILD_SETTINGS","CACHED_PACKAGE_JSON","getTempPrebuildFolder","projectRoot","path","join","hasNewDependenciesSinceLastBuild","packageChecksums","templateDirectory","tempPkgJsonPath","fs","existsSync","dependencies","devDependencies","JsonFile","read","hasNewDependencies","hasNewDevDependencies","createPackageChecksums","pkg","hashForDependencyMap","getPackageJson","packages","ensureDirectoryAsync","writeAsync","step","logNewSection","process","platform","succeed","packageManager","PackageManager","CocoaPodsPackageManager","cwd","silent","env","EXPO_DEBUG","CI","isCLIInstalledAsync","text","stopAndPersist","installCLIAsync","nonInteractive","spawnOptions","options","stdio","error","symbol","chalk","red","CocoaPodsError","Log","log","message","installAsync","spinner","catch","doesProjectUseCocoaPods","isLockfileCreated","podfileLockPath","isPodFolderCreated","podFolderPath","AbortCommandError","promptToInstallPodsAsync","missingPods","length","map","pod","bold","promises","rm","recursive","force"],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["utils/cocoapods.ts"],"sourcesContent":[null],"names":["hasPackageJsonDependencyListChangedAsync","installCocoaPodsAsync","maybePromptToSyncPodsAsync","PROJECT_PREBUILD_SETTINGS","CACHED_PACKAGE_JSON","getTempPrebuildFolder","projectRoot","path","join","hasNewDependenciesSinceLastBuild","packageChecksums","templateDirectory","tempPkgJsonPath","fs","existsSync","dependencies","devDependencies","JsonFile","read","hasNewDependencies","hasNewDevDependencies","createPackageChecksums","pkg","hashForDependencyMap","getPackageJson","packages","ensureDirectoryAsync","writeAsync","step","logNewSection","process","platform","succeed","packageManager","PackageManager","CocoaPodsPackageManager","cwd","silent","env","EXPO_DEBUG","CI","isCLIInstalledAsync","text","stopAndPersist","installCLIAsync","nonInteractive","spawnOptions","options","stdio","error","symbol","chalk","red","CocoaPodsError","Log","log","message","installAsync","spinner","catch","doesProjectUseCocoaPods","isLockfileCreated","podfileLockPath","isPodFolderCreated","podFolderPath","exp","getConfig","skipSDKVersionRequirement","isSwiftPMEnabled","skipping","getSwiftPMMarkerPath","assertNoSwiftPMMarker","AbortCommandError","promptToInstallPodsAsync","missingPods","length","map","pod","bold","promises","rm","recursive","force"],"mappings":";;;;;;;;;;;;;;;;QA4DsBA;eAAAA;;QAgBAC;eAAAA;;QA6EAC;eAAAA;;;;yBAxJoB;;;;;;;gEACrB;;;;;;;iEACW;;;;;;;gEACd;;;;;;;gEACH;;;;;;;gEACE;;;;;;6DAEI;8BAKd;mCAC8B;qBACA;qBACjB;wBACc;qBACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAS9B,MAAMC,4BAA4B;AAClC,MAAMC,sBAAsB;AAE5B,SAASC,sBAAsBC,WAAmB;IAChD,OAAOC,eAAI,CAACC,IAAI,CAACF,aAAaH;AAChC;AAEA,SAASM,iCACPH,WAAmB,E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,EAAE2C,gBAAK,CAAC2B,IAAI,CAAC,eAAe,GAAG,CAAC;IAE3E;IAEA,IAAI;QACF,IAAI,CAAE,MAAM7E,sBAAsBK,cAAe;YAC/C,MAAM,IAAIkE,yBAAiB;QAC7B;IACF,EAAE,OAAOvB,OAAO;QACd,MAAMpC,aAAE,CAACkE,QAAQ,CAACC,EAAE,CAACzE,eAAI,CAACC,IAAI,CAACH,sBAAsBC,cAAcF,sBAAsB;YACvF6E,WAAW;YACXC,OAAO;QACT;QACA,MAAMjC;IACR;AACF"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import { type SerializedError } from '2g';
|
|
2
|
+
declare module '2g' {
|
|
3
|
+
interface EventRegistry {
|
|
4
|
+
'cli:error': {
|
|
5
|
+
error: SerializedError;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
1
9
|
/**
|
|
2
10
|
* General error, formatted as a message in red text when caught by expo-cli (no stack trace is printed). Should be used in favor of `log.error()` in most cases.
|
|
3
11
|
*/
|
|
@@ -17,7 +25,7 @@ export declare class AbortCommandError extends CommandError {
|
|
|
17
25
|
export declare class SilentError extends CommandError {
|
|
18
26
|
constructor(messageOrError?: string | Error);
|
|
19
27
|
}
|
|
20
|
-
export declare function logCmdError(error: any): never
|
|
28
|
+
export declare function logCmdError(error: any): Promise<never>;
|
|
21
29
|
/** This should never be thrown in production. */
|
|
22
30
|
export declare class UnimplementedError extends Error {
|
|
23
31
|
constructor();
|
|
@@ -32,6 +32,13 @@ _export(exports, {
|
|
|
32
32
|
return logCmdError;
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
+
function _2g() {
|
|
36
|
+
const data = require("2g");
|
|
37
|
+
_2g = function() {
|
|
38
|
+
return data;
|
|
39
|
+
};
|
|
40
|
+
return data;
|
|
41
|
+
}
|
|
35
42
|
function _assert() {
|
|
36
43
|
const data = require("assert");
|
|
37
44
|
_assert = function() {
|
|
@@ -60,6 +67,7 @@ function _interop_require_default(obj) {
|
|
|
60
67
|
};
|
|
61
68
|
}
|
|
62
69
|
const ERROR_PREFIX = 'Error: ';
|
|
70
|
+
const event = (0, _2g().events)('cli');
|
|
63
71
|
class CommandError extends Error {
|
|
64
72
|
code;
|
|
65
73
|
name = 'CommandError';
|
|
@@ -90,14 +98,20 @@ class SilentError extends CommandError {
|
|
|
90
98
|
}
|
|
91
99
|
}
|
|
92
100
|
}
|
|
93
|
-
function logCmdError(error) {
|
|
101
|
+
async function logCmdError(error) {
|
|
94
102
|
if (!(error instanceof Error)) {
|
|
95
103
|
throw error;
|
|
96
104
|
}
|
|
97
105
|
if (error instanceof AbortCommandError || error instanceof SilentError) {
|
|
98
106
|
// Do nothing, this is used for prompts or other cases that were custom logged.
|
|
107
|
+
await (0, _2g().flushEventLogger)();
|
|
99
108
|
process.exit(1);
|
|
100
|
-
}
|
|
109
|
+
}
|
|
110
|
+
event('error', {
|
|
111
|
+
error: event.error(error)
|
|
112
|
+
});
|
|
113
|
+
await (0, _2g().flushEventLogger)();
|
|
114
|
+
if (error instanceof CommandError || error instanceof _assert().AssertionError || error.name === 'ApiV2Error' || error.name === 'ConfigError') {
|
|
101
115
|
// Print the stack trace in debug mode only.
|
|
102
116
|
(0, _log.exit)(error);
|
|
103
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["utils/errors.ts"],"sourcesContent":[null],"names":["AbortCommandError","CommandError","SilentError","UnimplementedError","logCmdError","ERROR_PREFIX","Error","name","isCommandError","code","message","startsWith","substring","length","messageOrError","stack","error","process","exit","AssertionError","errorDetails","chalk","gray","red","toString","handleTooManyOpenFileErrors","platform","execSync","stdio","warn","exception","on"],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["utils/errors.ts"],"sourcesContent":[null],"names":["AbortCommandError","CommandError","SilentError","UnimplementedError","logCmdError","ERROR_PREFIX","event","events","Error","name","isCommandError","code","message","startsWith","substring","length","messageOrError","stack","error","flushEventLogger","process","exit","AssertionError","errorDetails","chalk","gray","red","toString","handleTooManyOpenFileErrors","platform","execSync","stdio","warn","exception","on"],"mappings":";;;;;;;;;;;;;;;;;;QAwCaA;eAAAA;;QApBAC;eAAAA;;QA6BAC;eAAAA;;QAyCAC;eAAAA;;QA3BSC;eAAAA;;;;yBA/DyC;;;;;;;yBAChC;;;;;;;gEACb;;;;;;;yBACO;;;;;;qBAEa;;;;;;AAEtC,MAAMC,eAAe;AAQrB,MAAMC,QAAQC,IAAAA,YAAM,EAAC;AAKd,MAAMN,qBAAqBO;;IAChCC,OAAO,eAAe;IACbC,iBAAiB,KAAK;IAG/B,YACE,AAAOC,IAAY,EACnBC,UAAkB,EAAE,CACpB;QACA,KAAK,CAAC,UAHCD,OAAAA;QAIP,uEAAuE;QACvE,wBAAwB;QACxB,IAAIC,QAAQC,UAAU,CAACR,eAAe;YACpCO,UAAUA,QAAQE,SAAS,CAACT,aAAaU,MAAM;QACjD;QAEA,IAAI,CAACH,OAAO,GAAGA,WAAWD;IAC5B;AACF;AAEO,MAAMX,0BAA0BC;IACrC,aAAc;QACZ,KAAK,CAAC,WAAW;IACnB;AACF;AAKO,MAAMC,oBAAoBD;IAC/B,YAAYe,cAA+B,CAAE;QAC3C,MAAMJ,UACJ,AAAC,CAAA,OAAOI,mBAAmB,WAAWA,iBAAiBA,gBAAgBJ,OAAM,KAC7E;QACF,KAAK,CAAC,UAAUA;QAChB,IAAI,OAAOI,mBAAmB,UAAU;YACtC,kHAAkH;YAClH,IAAI,CAACC,KAAK,GAAGD,gBAAgBC,SAAS,IAAI,CAACA,KAAK;YAChD,IAAI,CAACR,IAAI,GAAGO,gBAAgBP,QAAQ,IAAI,CAACA,IAAI;QAC/C;IACF;AACF;AAEO,eAAeL,YAAYc,KAAU;IAC1C,IAAI,CAAEA,CAAAA,iBAAiBV,KAAI,GAAI;QAC7B,MAAMU;IACR;IACA,IAAIA,iBAAiBlB,qBAAqBkB,iBAAiBhB,aAAa;QACtE,+EAA+E;QAC/E,MAAMiB,IAAAA,sBAAgB;QACtBC,QAAQC,IAAI,CAAC;IACf;IACAf,MAAM,SAAS;QAAEY,OAAOZ,MAAMY,KAAK,CAACA;IAAO;IAC3C,MAAMC,IAAAA,sBAAgB;IACtB,IACED,iBAAiBjB,gBACjBiB,iBAAiBI,wBAAc,IAC/BJ,MAAMT,IAAI,KAAK,gBACfS,MAAMT,IAAI,KAAK,eACf;QACA,4CAA4C;QAC5CY,IAAAA,SAAI,EAACH;IACP;IAEA,MAAMK,eAAeL,MAAMD,KAAK,GAAG,OAAOO,gBAAK,CAACC,IAAI,CAACP,MAAMD,KAAK,IAAI;IAEpEI,IAAAA,SAAI,EAACG,gBAAK,CAACE,GAAG,CAACR,MAAMS,QAAQ,MAAMJ;AACrC;AAGO,MAAMpB,2BAA2BK;IACtC,aAAc;QACZ,KAAK,CAAC;QACN,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA;;;;;;;;CAQC,GACD,SAASmB,4BAA4BV,KAAU;IAC7C,4FAA4F;IAC5F,IAAI,UAAUA,SAASA,MAAMP,IAAI,KAAK,YAAYS,QAAQS,QAAQ,KAAK,UAAU;QAC/E,IAAI;YACF,iEAAiE;YACjEC,IAAAA,yBAAQ,EAAC,4BAA4B;gBAAEC,OAAO;YAAS;YACvD,6EAA6E;YAC7ED,IAAAA,yBAAQ,EAAC,0BAA0B;gBAAEC,OAAO;YAAS;YAErDC,IAAAA,SAAI,EACF;QAEJ,EAAE,OAAM;YACNA,IAAAA,SAAI,EACF,CAAC,wJAAwJ,CAAC;QAE9J;QAEAC,IAAAA,cAAS,EAACf;QACVE,QAAQC,IAAI,CAAC;IACf;IAEA,MAAMH;AACR;AAEAE,QAAQc,EAAE,CAAC,qBAAqBN"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare module '2g' {
|
|
2
|
+
interface MetadataRegistry {
|
|
3
|
+
/** Absolute project root when it differs from the session working directory. */
|
|
4
|
+
projectRoot: string;
|
|
5
|
+
/** Default dev server is available. Consumers must also check session.alive. */
|
|
6
|
+
ready: boolean;
|
|
7
|
+
/** Default dev server URL, as shown by the non-interactive CLI. */
|
|
8
|
+
devServerUrl: string | null;
|
|
9
|
+
/** Actual local listening port, which may differ from the advertised URL. */
|
|
10
|
+
port: number | null;
|
|
11
|
+
/** Native launch URL; null for servers targeting only web. */
|
|
12
|
+
runtimeUrl: string | null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export declare function updateProjectRootMetadata(projectRoot: string): void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "updateProjectRootMetadata", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return updateProjectRootMetadata;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
function _2g() {
|
|
12
|
+
const data = require("2g");
|
|
13
|
+
_2g = function() {
|
|
14
|
+
return data;
|
|
15
|
+
};
|
|
16
|
+
return data;
|
|
17
|
+
}
|
|
18
|
+
function _path() {
|
|
19
|
+
const data = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
20
|
+
_path = function() {
|
|
21
|
+
return data;
|
|
22
|
+
};
|
|
23
|
+
return data;
|
|
24
|
+
}
|
|
25
|
+
function _interop_require_default(obj) {
|
|
26
|
+
return obj && obj.__esModule ? obj : {
|
|
27
|
+
default: obj
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function updateProjectRootMetadata(projectRoot) {
|
|
31
|
+
const resolvedRoot = _path().default.resolve(projectRoot);
|
|
32
|
+
if (resolvedRoot !== process.cwd()) {
|
|
33
|
+
(0, _2g().updateEventLoggerMetadata)({
|
|
34
|
+
projectRoot: resolvedRoot
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["utils/metadata.ts"],"sourcesContent":[null],"names":["updateProjectRootMetadata","projectRoot","resolvedRoot","path","resolve","process","cwd","updateEventLoggerMetadata"],"mappings":";;;;+BAkBgBA;;;eAAAA;;;;yBAlB0B;;;;;;;gEACzB;;;;;;;;;;;AAiBV,SAASA,0BAA0BC,WAAmB;IAC3D,MAAMC,eAAeC,eAAI,CAACC,OAAO,CAACH;IAClC,IAAIC,iBAAiBG,QAAQC,GAAG,IAAI;QAClCC,IAAAA,+BAAyB,EAAC;YAAEN,aAAaC;QAAa;IACxD;AACF"}
|