create-expo 3.5.0 → 3.5.2
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.
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports.id =
|
|
3
|
-
exports.ids = [
|
|
2
|
+
exports.id = 178;
|
|
3
|
+
exports.ids = [178];
|
|
4
4
|
exports.modules = {
|
|
5
5
|
|
|
6
|
-
/***/
|
|
6
|
+
/***/ 9178:
|
|
7
7
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
8
|
|
|
9
|
-
// ESM COMPAT FLAG
|
|
10
|
-
__webpack_require__.r(__webpack_exports__);
|
|
11
9
|
|
|
12
10
|
// EXPORTS
|
|
13
11
|
__webpack_require__.d(__webpack_exports__, {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"track": () => (/* binding */ track)
|
|
12
|
+
AnalyticsEventPhases: () => (/* binding */ AnalyticsEventPhases),
|
|
13
|
+
AnalyticsEventTypes: () => (/* binding */ AnalyticsEventTypes),
|
|
14
|
+
flushAsync: () => (/* binding */ flushAsync),
|
|
15
|
+
ls: () => (/* binding */ identify),
|
|
16
|
+
PB: () => (/* binding */ initializeAnalyticsIdentityAsync),
|
|
17
|
+
track: () => (/* binding */ track)
|
|
21
18
|
});
|
|
22
19
|
|
|
20
|
+
// UNUSED EXPORTS: _resetGlobals
|
|
21
|
+
|
|
23
22
|
// EXTERNAL MODULE: ../@expo/json-file/build/JsonFile.js
|
|
24
|
-
var JsonFile = __webpack_require__(
|
|
23
|
+
var JsonFile = __webpack_require__(4419);
|
|
25
24
|
var JsonFile_default = /*#__PURE__*/__webpack_require__.n(JsonFile);
|
|
26
25
|
// EXTERNAL MODULE: external "crypto"
|
|
27
|
-
var external_crypto_ = __webpack_require__(
|
|
26
|
+
var external_crypto_ = __webpack_require__(6982);
|
|
28
27
|
var external_crypto_default = /*#__PURE__*/__webpack_require__.n(external_crypto_);
|
|
29
28
|
// EXTERNAL MODULE: external "fs"
|
|
30
|
-
var external_fs_ = __webpack_require__(
|
|
29
|
+
var external_fs_ = __webpack_require__(9896);
|
|
31
30
|
var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_);
|
|
32
31
|
// EXTERNAL MODULE: external "os"
|
|
33
|
-
var external_os_ = __webpack_require__(
|
|
32
|
+
var external_os_ = __webpack_require__(857);
|
|
34
33
|
var external_os_default = /*#__PURE__*/__webpack_require__.n(external_os_);
|
|
35
34
|
// EXTERNAL MODULE: external "path"
|
|
36
|
-
var external_path_ = __webpack_require__(
|
|
35
|
+
var external_path_ = __webpack_require__(6928);
|
|
37
36
|
var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_);
|
|
38
37
|
;// CONCATENATED MODULE: ./src/paths.ts
|
|
39
38
|
|
|
@@ -75,7 +74,7 @@ function getSession() {
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
// EXTERNAL MODULE: ./src/utils/env.ts
|
|
78
|
-
var
|
|
77
|
+
var utils_env = __webpack_require__(4695);
|
|
79
78
|
;// CONCATENATED MODULE: ./src/telemetry.ts
|
|
80
79
|
|
|
81
80
|
|
|
@@ -84,7 +83,7 @@ var env = __webpack_require__(7943);
|
|
|
84
83
|
|
|
85
84
|
|
|
86
85
|
|
|
87
|
-
const packageJSON = __webpack_require__(
|
|
86
|
+
const packageJSON = __webpack_require__(8330);
|
|
88
87
|
const xdlUnifiedWriteKey = '1wabJGd5IiuF9Q8SGlcI90v8WTs';
|
|
89
88
|
const analyticsEndpoint = 'https://cdp.expo.dev/v1/batch';
|
|
90
89
|
const version = '1.0.0';
|
|
@@ -93,7 +92,7 @@ const messageBatch = [];
|
|
|
93
92
|
let analyticsIdentity = null;
|
|
94
93
|
// jest does not clear global variables inbetween tests so we need this helper
|
|
95
94
|
function _resetGlobals() {
|
|
96
|
-
if (env.
|
|
95
|
+
if (env.EXPO_NO_TELEMETRY)
|
|
97
96
|
return;
|
|
98
97
|
analyticsIdentity = null;
|
|
99
98
|
messageBatch.splice(0, messageBatch.length);
|
|
@@ -101,7 +100,7 @@ function _resetGlobals() {
|
|
|
101
100
|
// call before tracking any analytics events.
|
|
102
101
|
// if track/identify are called before this method they will be dropped
|
|
103
102
|
async function initializeAnalyticsIdentityAsync() {
|
|
104
|
-
if (
|
|
103
|
+
if (utils_env.env.EXPO_NO_TELEMETRY)
|
|
105
104
|
return;
|
|
106
105
|
if (analyticsIdentity) {
|
|
107
106
|
return;
|
|
@@ -109,12 +108,12 @@ async function initializeAnalyticsIdentityAsync() {
|
|
|
109
108
|
analyticsIdentity = await getAnalyticsIdentityAsync();
|
|
110
109
|
}
|
|
111
110
|
function identify() {
|
|
112
|
-
if (
|
|
111
|
+
if (utils_env.env.EXPO_NO_TELEMETRY)
|
|
113
112
|
return;
|
|
114
113
|
enqueue('identify', {});
|
|
115
114
|
}
|
|
116
115
|
function track(message) {
|
|
117
|
-
if (
|
|
116
|
+
if (utils_env.env.EXPO_NO_TELEMETRY)
|
|
118
117
|
return;
|
|
119
118
|
enqueue('track', { ...message, context: getAnalyticsContext() });
|
|
120
119
|
}
|
|
@@ -158,7 +157,7 @@ function enqueue(type, message) {
|
|
|
158
157
|
// very barebones implemention...
|
|
159
158
|
// does not support multiple concurrent flushes or large numbers of messages
|
|
160
159
|
async function flushAsync() {
|
|
161
|
-
if (
|
|
160
|
+
if (utils_env.env.EXPO_NO_TELEMETRY)
|
|
162
161
|
return;
|
|
163
162
|
if (!messageBatch.length) {
|
|
164
163
|
return;
|
|
@@ -1,55 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
exports.id =
|
|
3
|
-
exports.ids = [
|
|
2
|
+
exports.id = 396;
|
|
3
|
+
exports.ids = [396,178];
|
|
4
4
|
exports.modules = {
|
|
5
5
|
|
|
6
|
-
/***/
|
|
6
|
+
/***/ 1396:
|
|
7
7
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
8
|
|
|
9
|
-
// ESM COMPAT FLAG
|
|
10
|
-
__webpack_require__.r(__webpack_exports__);
|
|
11
9
|
|
|
12
10
|
// EXPORTS
|
|
13
11
|
__webpack_require__.d(__webpack_exports__, {
|
|
14
|
-
|
|
15
|
-
"logNodeInstallWarning": () => (/* binding */ logNodeInstallWarning)
|
|
12
|
+
createAsync: () => (/* binding */ createAsync)
|
|
16
13
|
});
|
|
17
14
|
|
|
15
|
+
// UNUSED EXPORTS: logNodeInstallWarning
|
|
16
|
+
|
|
18
17
|
// EXTERNAL MODULE: ../../node_modules/chalk/source/index.js
|
|
19
|
-
var source = __webpack_require__(
|
|
18
|
+
var source = __webpack_require__(2325);
|
|
20
19
|
var source_default = /*#__PURE__*/__webpack_require__.n(source);
|
|
21
20
|
// EXTERNAL MODULE: external "fs"
|
|
22
|
-
var external_fs_ = __webpack_require__(
|
|
21
|
+
var external_fs_ = __webpack_require__(9896);
|
|
23
22
|
var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_);
|
|
24
23
|
// EXTERNAL MODULE: external "path"
|
|
25
|
-
var external_path_ = __webpack_require__(
|
|
24
|
+
var external_path_ = __webpack_require__(6928);
|
|
26
25
|
var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_);
|
|
27
26
|
// EXTERNAL MODULE: ../@expo/json-file/build/JsonFile.js
|
|
28
|
-
var JsonFile = __webpack_require__(
|
|
27
|
+
var JsonFile = __webpack_require__(4419);
|
|
29
28
|
var JsonFile_default = /*#__PURE__*/__webpack_require__.n(JsonFile);
|
|
30
29
|
// EXTERNAL MODULE: ../../node_modules/prompts/index.js
|
|
31
|
-
var prompts = __webpack_require__(
|
|
30
|
+
var prompts = __webpack_require__(2171);
|
|
32
31
|
var prompts_default = /*#__PURE__*/__webpack_require__.n(prompts);
|
|
33
32
|
// EXTERNAL MODULE: external "stream"
|
|
34
|
-
var external_stream_ = __webpack_require__(
|
|
33
|
+
var external_stream_ = __webpack_require__(2203);
|
|
35
34
|
// EXTERNAL MODULE: ./node_modules/tar/dist/esm/index.js + 40 modules
|
|
36
|
-
var esm = __webpack_require__(
|
|
35
|
+
var esm = __webpack_require__(7112);
|
|
37
36
|
// EXTERNAL MODULE: external "util"
|
|
38
|
-
var external_util_ = __webpack_require__(
|
|
37
|
+
var external_util_ = __webpack_require__(9023);
|
|
39
38
|
// EXTERNAL MODULE: ../@expo/package-manager/build/index.js
|
|
40
|
-
var build = __webpack_require__(
|
|
39
|
+
var build = __webpack_require__(54);
|
|
41
40
|
// EXTERNAL MODULE: ../../node_modules/glob/dist/esm/index.js + 14 modules
|
|
42
|
-
var dist_esm = __webpack_require__(
|
|
41
|
+
var dist_esm = __webpack_require__(1720);
|
|
43
42
|
// EXTERNAL MODULE: ../../node_modules/ora/index.js
|
|
44
|
-
var ora = __webpack_require__(
|
|
43
|
+
var ora = __webpack_require__(6524);
|
|
45
44
|
var ora_default = /*#__PURE__*/__webpack_require__.n(ora);
|
|
46
45
|
// EXTERNAL MODULE: ../../node_modules/picomatch/index.js
|
|
47
|
-
var picomatch = __webpack_require__(
|
|
46
|
+
var picomatch = __webpack_require__(1026);
|
|
48
47
|
var picomatch_default = /*#__PURE__*/__webpack_require__.n(picomatch);
|
|
49
48
|
;// CONCATENATED MODULE: ./src/createFileTransform.ts
|
|
50
49
|
|
|
51
50
|
|
|
52
|
-
const debug = __webpack_require__(
|
|
51
|
+
const debug = __webpack_require__(7674)('expo:init:fileTransform');
|
|
53
52
|
function sanitizedName(name) {
|
|
54
53
|
return name
|
|
55
54
|
.replace(/[\W_]+/g, '')
|
|
@@ -100,13 +99,13 @@ function createGlobFilter(globPattern, options) {
|
|
|
100
99
|
}
|
|
101
100
|
|
|
102
101
|
// EXTERNAL MODULE: ./src/log.ts
|
|
103
|
-
var log = __webpack_require__(
|
|
102
|
+
var log = __webpack_require__(8032);
|
|
104
103
|
// EXTERNAL MODULE: ./src/resolvePackageManager.ts
|
|
105
|
-
var resolvePackageManager = __webpack_require__(
|
|
104
|
+
var resolvePackageManager = __webpack_require__(1129);
|
|
106
105
|
// EXTERNAL MODULE: ./src/utils/env.ts
|
|
107
|
-
var env = __webpack_require__(
|
|
106
|
+
var env = __webpack_require__(4695);
|
|
108
107
|
// EXTERNAL MODULE: external "node:process"
|
|
109
|
-
var external_node_process_ = __webpack_require__(
|
|
108
|
+
var external_node_process_ = __webpack_require__(1708);
|
|
110
109
|
;// CONCATENATED MODULE: ./src/utils/fetch.ts
|
|
111
110
|
|
|
112
111
|
/**
|
|
@@ -128,10 +127,10 @@ function wrapFetchWithAssert(fetchFunction) {
|
|
|
128
127
|
const fetch = wrapFetchWithAssert(globalThis.fetch);
|
|
129
128
|
|
|
130
129
|
// EXTERNAL MODULE: ../../node_modules/@expo/spawn-async/build/spawnAsync.js
|
|
131
|
-
var spawnAsync = __webpack_require__(
|
|
130
|
+
var spawnAsync = __webpack_require__(8841);
|
|
132
131
|
var spawnAsync_default = /*#__PURE__*/__webpack_require__.n(spawnAsync);
|
|
133
132
|
// EXTERNAL MODULE: external "os"
|
|
134
|
-
var external_os_ = __webpack_require__(
|
|
133
|
+
var external_os_ = __webpack_require__(857);
|
|
135
134
|
var external_os_default = /*#__PURE__*/__webpack_require__.n(external_os_);
|
|
136
135
|
;// CONCATENATED MODULE: ./src/legacyTemplates.ts
|
|
137
136
|
|
|
@@ -177,7 +176,7 @@ async function promptTemplateAsync() {
|
|
|
177
176
|
});
|
|
178
177
|
if (!answer) {
|
|
179
178
|
console.log();
|
|
180
|
-
console.log(
|
|
179
|
+
console.log(source_default() `Specify the template name, example: {cyan --template expo-template-blank}`);
|
|
181
180
|
console.log();
|
|
182
181
|
process.exit(1);
|
|
183
182
|
}
|
|
@@ -196,7 +195,7 @@ async function promptTemplateAsync() {
|
|
|
196
195
|
|
|
197
196
|
|
|
198
197
|
|
|
199
|
-
const npm_debug = __webpack_require__(
|
|
198
|
+
const npm_debug = __webpack_require__(7674)('expo:init:npm');
|
|
200
199
|
// @ts-ignore
|
|
201
200
|
const pipeline = (0,external_util_.promisify)(external_stream_.Stream.pipeline);
|
|
202
201
|
function getTemporaryCacheFilePath(subdir = 'template-cache') {
|
|
@@ -271,7 +270,7 @@ async function extractNpmTarballAsync(stream, props) {
|
|
|
271
270
|
}
|
|
272
271
|
const { cwd, strip, name, fileList = [], filter } = props;
|
|
273
272
|
await external_fs_default().promises.mkdir(cwd, { recursive: true });
|
|
274
|
-
await pipeline(stream, (0,esm/* extract */.
|
|
273
|
+
await pipeline(stream, (0,esm/* extract */.o6)({
|
|
275
274
|
cwd,
|
|
276
275
|
filter,
|
|
277
276
|
onentry: createEntryResolver(name),
|
|
@@ -367,7 +366,7 @@ async function downloadAndExtractNpmModuleAsync(npmName, props) {
|
|
|
367
366
|
}
|
|
368
367
|
}
|
|
369
368
|
catch (error) {
|
|
370
|
-
log/* Log
|
|
369
|
+
log/* Log */.tG.error('Error downloading template package: ' + npmName);
|
|
371
370
|
throw error;
|
|
372
371
|
}
|
|
373
372
|
try {
|
|
@@ -377,7 +376,7 @@ async function downloadAndExtractNpmModuleAsync(npmName, props) {
|
|
|
377
376
|
});
|
|
378
377
|
}
|
|
379
378
|
catch (error) {
|
|
380
|
-
log/* Log
|
|
379
|
+
log/* Log */.tG.error('Error extracting template package: ' + npmName);
|
|
381
380
|
throw error;
|
|
382
381
|
}
|
|
383
382
|
}
|
|
@@ -387,7 +386,7 @@ async function downloadAndExtractNpmModuleAsync(npmName, props) {
|
|
|
387
386
|
|
|
388
387
|
|
|
389
388
|
|
|
390
|
-
const github_debug = __webpack_require__(
|
|
389
|
+
const github_debug = __webpack_require__(7674)('expo:init:github');
|
|
391
390
|
// See: https://github.com/expo/expo/blob/a5a6eecb082b2c7a7fc9956141738231c7df473f/packages/%40expo/cli/src/prebuild/resolveTemplate.ts#L60-L84
|
|
392
391
|
async function getGitHubRepoAsync(url) {
|
|
393
392
|
const [, owner, name, t, branch, ...file] = url.pathname.split('/');
|
|
@@ -469,7 +468,7 @@ async function downloadAndExtractGitHubRepositoryAsync(repoUrl, props) {
|
|
|
469
468
|
|
|
470
469
|
|
|
471
470
|
|
|
472
|
-
const Template_debug = __webpack_require__(
|
|
471
|
+
const Template_debug = __webpack_require__(7674)('expo:init:template');
|
|
473
472
|
const isMacOS = process.platform === 'darwin';
|
|
474
473
|
// keep this list in sync with the validation helper in WWW: src/utils/experienceParser.ts
|
|
475
474
|
const FORBIDDEN_NAMES = [
|
|
@@ -581,7 +580,7 @@ async function extractAndPrepareTemplateAppAsync(projectRoot, { npmPackage }) {
|
|
|
581
580
|
});
|
|
582
581
|
}
|
|
583
582
|
catch (error) {
|
|
584
|
-
log/* Log
|
|
583
|
+
log/* Log */.tG.error('Error renaming app name in template');
|
|
585
584
|
throw error;
|
|
586
585
|
}
|
|
587
586
|
await sanitizeTemplateAsync(projectRoot);
|
|
@@ -666,7 +665,7 @@ renameConfig: userConfig, }) {
|
|
|
666
665
|
let config = userConfig ?? defaultRenameConfig;
|
|
667
666
|
// Strip comments, trim whitespace, and remove empty lines.
|
|
668
667
|
config = config.map((line) => line.split(/(?<!\\)#/, 2)[0].trim()).filter((line) => line !== '');
|
|
669
|
-
return await (0,dist_esm/* glob */.
|
|
668
|
+
return await (0,dist_esm/* glob */.TI)(config, {
|
|
670
669
|
cwd,
|
|
671
670
|
// `true` is consistent with .gitignore. Allows `*.xml` to match .xml files
|
|
672
671
|
// in all subdirs.
|
|
@@ -767,14 +766,14 @@ function logProjectReady({ cdPath, packageManager, }) {
|
|
|
767
766
|
console.log(`To run your project, run one of the following ${packageManager} commands.`);
|
|
768
767
|
console.log();
|
|
769
768
|
}
|
|
770
|
-
console.log(`- ${source_default().bold((0,resolvePackageManager/* formatRunCommand */.
|
|
769
|
+
console.log(`- ${source_default().bold((0,resolvePackageManager/* formatRunCommand */.Wq)(packageManager, 'android'))}`);
|
|
771
770
|
let macOSComment = '';
|
|
772
771
|
if (!isMacOS) {
|
|
773
772
|
macOSComment =
|
|
774
773
|
' # you need to use macOS to build the iOS project - use the Expo app if you need to do iOS development without a Mac';
|
|
775
774
|
}
|
|
776
|
-
console.log(`- ${source_default().bold((0,resolvePackageManager/* formatRunCommand */.
|
|
777
|
-
console.log(`- ${source_default().bold((0,resolvePackageManager/* formatRunCommand */.
|
|
775
|
+
console.log(`- ${source_default().bold((0,resolvePackageManager/* formatRunCommand */.Wq)(packageManager, 'ios'))}${macOSComment}`);
|
|
776
|
+
console.log(`- ${source_default().bold((0,resolvePackageManager/* formatRunCommand */.Wq)(packageManager, 'web'))}`);
|
|
778
777
|
}
|
|
779
778
|
async function installPodsAsync(projectRoot) {
|
|
780
779
|
let step = logNewSection('Installing CocoaPods.');
|
|
@@ -800,7 +799,7 @@ async function installPodsAsync(projectRoot) {
|
|
|
800
799
|
text: source_default().red('Unable to install the CocoaPods CLI. Continuing with initializing the project, you can install CocoaPods afterwards.'),
|
|
801
800
|
});
|
|
802
801
|
if (e.message) {
|
|
803
|
-
log/* Log
|
|
802
|
+
log/* Log */.tG.error(`- ${e.message}`);
|
|
804
803
|
}
|
|
805
804
|
return false;
|
|
806
805
|
}
|
|
@@ -816,7 +815,7 @@ async function installPodsAsync(projectRoot) {
|
|
|
816
815
|
text: source_default().red('Something went wrong running `pod install` in the `ios` directory. Continuing with initializing the project, you can debug this afterwards.'),
|
|
817
816
|
});
|
|
818
817
|
if (e.message) {
|
|
819
|
-
log/* Log
|
|
818
|
+
log/* Log */.tG.error(`- ${e.message}`);
|
|
820
819
|
}
|
|
821
820
|
return false;
|
|
822
821
|
}
|
|
@@ -847,7 +846,7 @@ function logNewSection(title) {
|
|
|
847
846
|
|
|
848
847
|
|
|
849
848
|
|
|
850
|
-
const Examples_debug = __webpack_require__(
|
|
849
|
+
const Examples_debug = __webpack_require__(7674)('expo:init:template');
|
|
851
850
|
const Examples_pipeline = (0,external_util_.promisify)(external_stream_.Stream.pipeline);
|
|
852
851
|
/** List all existing examples directory from https://github.com/expo/examples. */
|
|
853
852
|
async function listExamplesAsync() {
|
|
@@ -897,7 +896,7 @@ async function promptExamplesAsync() {
|
|
|
897
896
|
});
|
|
898
897
|
if (!answer) {
|
|
899
898
|
console.log();
|
|
900
|
-
console.log(
|
|
899
|
+
console.log(source_default() `Specify the example name, for example: {cyan --example with-router}`);
|
|
901
900
|
console.log();
|
|
902
901
|
process.exit(1);
|
|
903
902
|
}
|
|
@@ -917,7 +916,7 @@ async function downloadAndExtractExampleAsync(root, name) {
|
|
|
917
916
|
}
|
|
918
917
|
await Examples_pipeline(
|
|
919
918
|
// @ts-expect-error see https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/65542
|
|
920
|
-
external_stream_.Readable.fromWeb(response.body), (0,esm/* extract */.
|
|
919
|
+
external_stream_.Readable.fromWeb(response.body), (0,esm/* extract */.o6)({
|
|
921
920
|
cwd: root,
|
|
922
921
|
onentry: createEntryResolver(projectName),
|
|
923
922
|
strip: 2,
|
|
@@ -992,23 +991,23 @@ function getConflictsForDirectory(projectRoot) {
|
|
|
992
991
|
function assertValidName(folderName) {
|
|
993
992
|
const validation = validateName(folderName);
|
|
994
993
|
if (typeof validation === 'string') {
|
|
995
|
-
log/* Log
|
|
994
|
+
log/* Log */.tG.exit(source_default() `{red Cannot create an app named {bold "${folderName}"}. ${validation}}`, 1);
|
|
996
995
|
}
|
|
997
996
|
const isFolderNameForbidden = Template_isFolderNameForbidden(folderName);
|
|
998
997
|
if (isFolderNameForbidden) {
|
|
999
|
-
log/* Log
|
|
998
|
+
log/* Log */.tG.exit(source_default() `{red Cannot create an app named {bold "${folderName}"} because it would conflict with a dependency of the same name.}`, 1);
|
|
1000
999
|
}
|
|
1001
1000
|
}
|
|
1002
1001
|
function assertFolderEmpty(projectRoot, folderName) {
|
|
1003
1002
|
const conflicts = getConflictsForDirectory(projectRoot);
|
|
1004
1003
|
if (conflicts.length) {
|
|
1005
|
-
log/* Log
|
|
1006
|
-
log/* Log
|
|
1004
|
+
log/* Log */.tG.log(source_default() `The directory {cyan ${folderName}} has files that might be overwritten:`);
|
|
1005
|
+
log/* Log */.tG.log();
|
|
1007
1006
|
for (const file of conflicts) {
|
|
1008
|
-
log/* Log
|
|
1007
|
+
log/* Log */.tG.log(` ${file}`);
|
|
1009
1008
|
}
|
|
1010
|
-
log/* Log
|
|
1011
|
-
log/* Log
|
|
1009
|
+
log/* Log */.tG.log();
|
|
1010
|
+
log/* Log */.tG.exit('Try using a new directory name, or moving these files.\n');
|
|
1012
1011
|
}
|
|
1013
1012
|
}
|
|
1014
1013
|
async function resolveProjectRootAsync(input) {
|
|
@@ -1032,15 +1031,15 @@ async function resolveProjectRootAsync(input) {
|
|
|
1032
1031
|
}
|
|
1033
1032
|
}
|
|
1034
1033
|
if (!name) {
|
|
1035
|
-
const selfCmd = (0,resolvePackageManager/* formatSelfCommand */.
|
|
1036
|
-
log/* Log
|
|
1037
|
-
log/* Log
|
|
1038
|
-
log/* Log
|
|
1039
|
-
log/* Log
|
|
1040
|
-
log/* Log
|
|
1041
|
-
log/* Log
|
|
1042
|
-
log/* Log
|
|
1043
|
-
log/* Log
|
|
1034
|
+
const selfCmd = (0,resolvePackageManager/* formatSelfCommand */.fZ)();
|
|
1035
|
+
log/* Log */.tG.log();
|
|
1036
|
+
log/* Log */.tG.log('Choose a name for your app:');
|
|
1037
|
+
log/* Log */.tG.log(source_default() ` {dim $} {cyan ${selfCmd} <name>}`);
|
|
1038
|
+
log/* Log */.tG.log();
|
|
1039
|
+
log/* Log */.tG.log(`For more info, run:`);
|
|
1040
|
+
log/* Log */.tG.log(source_default() ` {dim $} {cyan ${selfCmd} --help}`);
|
|
1041
|
+
log/* Log */.tG.log();
|
|
1042
|
+
log/* Log */.tG.exit('');
|
|
1044
1043
|
}
|
|
1045
1044
|
const projectRoot = external_path_default().resolve(name);
|
|
1046
1045
|
const folderName = external_path_default().basename(projectRoot);
|
|
@@ -1051,11 +1050,11 @@ async function resolveProjectRootAsync(input) {
|
|
|
1051
1050
|
}
|
|
1052
1051
|
|
|
1053
1052
|
// EXTERNAL MODULE: ./src/telemetry.ts + 2 modules
|
|
1054
|
-
var telemetry = __webpack_require__(
|
|
1053
|
+
var telemetry = __webpack_require__(9178);
|
|
1055
1054
|
;// CONCATENATED MODULE: ./src/utils/git.ts
|
|
1056
1055
|
|
|
1057
1056
|
|
|
1058
|
-
const git_debug = __webpack_require__(
|
|
1057
|
+
const git_debug = __webpack_require__(7674)('expo:init:git');
|
|
1059
1058
|
async function initGitRepoAsync(root) {
|
|
1060
1059
|
// let's see if we're in a git tree
|
|
1061
1060
|
try {
|
|
@@ -1069,7 +1068,7 @@ async function initGitRepoAsync(root) {
|
|
|
1069
1068
|
return false;
|
|
1070
1069
|
}
|
|
1071
1070
|
}
|
|
1072
|
-
const packageJSON = __webpack_require__(
|
|
1071
|
+
const packageJSON = __webpack_require__(8965);
|
|
1073
1072
|
// not in git tree, so let's init
|
|
1074
1073
|
try {
|
|
1075
1074
|
await spawnAsync_default()('git', ['init'], { stdio: 'ignore', cwd: root });
|
|
@@ -1124,7 +1123,7 @@ function withSectionLog(action, message) {
|
|
|
1124
1123
|
|
|
1125
1124
|
|
|
1126
1125
|
|
|
1127
|
-
const createAsync_debug = __webpack_require__(
|
|
1126
|
+
const createAsync_debug = __webpack_require__(7674)('expo:init:create');
|
|
1128
1127
|
async function resolveProjectRootArgAsync(inputPath, { yes }) {
|
|
1129
1128
|
if (!inputPath && yes) {
|
|
1130
1129
|
const projectRoot = external_path_default().resolve(process.cwd());
|
|
@@ -1139,7 +1138,7 @@ async function resolveProjectRootArgAsync(inputPath, { yes }) {
|
|
|
1139
1138
|
}
|
|
1140
1139
|
async function setupDependenciesAsync(projectRoot, props) {
|
|
1141
1140
|
const shouldInstall = props.install;
|
|
1142
|
-
const packageManager = (0,resolvePackageManager/* resolvePackageManager */.
|
|
1141
|
+
const packageManager = (0,resolvePackageManager/* resolvePackageManager */._c)();
|
|
1143
1142
|
// Configure package manager, which is unrelated to installing or not
|
|
1144
1143
|
await configureNodeDependenciesAsync(projectRoot, packageManager);
|
|
1145
1144
|
// Install dependencies
|
|
@@ -1175,12 +1174,12 @@ async function createTemplateAsync(inputPath, props) {
|
|
|
1175
1174
|
}
|
|
1176
1175
|
else {
|
|
1177
1176
|
resolvedTemplate = props.template ?? null;
|
|
1178
|
-
console.log(
|
|
1177
|
+
console.log(source_default() `Creating an Expo project using the {cyan ${resolvedTemplate ?? 'default'}} template.\n`);
|
|
1179
1178
|
if (!resolvedTemplate) {
|
|
1180
|
-
console.log(
|
|
1181
|
-
console.log(
|
|
1182
|
-
console.log(
|
|
1183
|
-
console.log(
|
|
1179
|
+
console.log(source_default() `{gray To choose from all available templates ({underline https://github.com/expo/expo/tree/main/templates}) pass in the --template arg:}`);
|
|
1180
|
+
console.log(source_default() ` {gray $} ${(0,resolvePackageManager/* formatSelfCommand */.fZ)()} {cyan --template}\n`);
|
|
1181
|
+
console.log(source_default() `{gray To choose from all available examples ({underline https://github.com/expo/examples}) pass in the --example arg:}`);
|
|
1182
|
+
console.log(source_default() ` {gray $} ${(0,resolvePackageManager/* formatSelfCommand */.fZ)()} {cyan --example}\n`);
|
|
1184
1183
|
}
|
|
1185
1184
|
}
|
|
1186
1185
|
const projectRoot = await resolveProjectRootArgAsync(inputPath, props);
|
|
@@ -1188,8 +1187,8 @@ async function createTemplateAsync(inputPath, props) {
|
|
|
1188
1187
|
// Setup telemetry attempt after a reasonable point.
|
|
1189
1188
|
// Telemetry is used to ensure safe feature deprecation since the command is unversioned.
|
|
1190
1189
|
// All telemetry can be disabled across Expo tooling by using the env var $EXPO_NO_TELEMETRY.
|
|
1191
|
-
await (0,telemetry
|
|
1192
|
-
(0,telemetry
|
|
1190
|
+
await (0,telemetry/* initializeAnalyticsIdentityAsync */.PB)();
|
|
1191
|
+
(0,telemetry/* identify */.ls)();
|
|
1193
1192
|
(0,telemetry.track)({
|
|
1194
1193
|
event: telemetry.AnalyticsEventTypes.CREATE_EXPO_APP,
|
|
1195
1194
|
properties: { phase: telemetry.AnalyticsEventPhases.ATTEMPT, template: resolvedTemplate },
|
|
@@ -1234,15 +1233,15 @@ async function createExampleAsync(inputPath, props) {
|
|
|
1234
1233
|
}
|
|
1235
1234
|
catch (error) {
|
|
1236
1235
|
createAsync_debug(`Error fetching metadata: %O`, error);
|
|
1237
|
-
log/* Log
|
|
1236
|
+
log/* Log */.tG.error(`Error fetching metadata, proceeding without alias or deprecation data.`);
|
|
1238
1237
|
}
|
|
1239
1238
|
if (metadata && metadata.aliases[resolvedExample]) {
|
|
1240
1239
|
const alias = metadata.aliases[resolvedExample];
|
|
1241
1240
|
const destination = typeof alias === 'string' ? alias : alias.destination;
|
|
1242
|
-
console.log(
|
|
1241
|
+
console.log(source_default() `{gray The {cyan ${resolvedExample}} example has been renamed to {cyan ${destination}}.}`);
|
|
1243
1242
|
// Optional message to show when an example is aliased, in case additional context is required
|
|
1244
1243
|
if (typeof alias === 'object' && alias.message) {
|
|
1245
|
-
console.log(
|
|
1244
|
+
console.log(source_default() `{gray ${alias.message}}`);
|
|
1246
1245
|
}
|
|
1247
1246
|
resolvedExample = destination;
|
|
1248
1247
|
}
|
|
@@ -1252,14 +1251,14 @@ async function createExampleAsync(inputPath, props) {
|
|
|
1252
1251
|
// Ensure the example exists after performing remapping and deprecation checks.
|
|
1253
1252
|
await ensureExampleExists(resolvedExample);
|
|
1254
1253
|
// Log the status after aliases and deprecated examples are handled.
|
|
1255
|
-
console.log(
|
|
1254
|
+
console.log(source_default() `Creating an Expo project using the {cyan ${resolvedExample}} example.\n`);
|
|
1256
1255
|
const projectRoot = await resolveProjectRootArgAsync(inputPath, props);
|
|
1257
1256
|
await external_fs_default().promises.mkdir(projectRoot, { recursive: true });
|
|
1258
1257
|
// Setup telemetry attempt after a reasonable point.
|
|
1259
1258
|
// Telemetry is used to ensure safe feature deprecation since the command is unversioned.
|
|
1260
1259
|
// All telemetry can be disabled across Expo tooling by using the env var $EXPO_NO_TELEMETRY.
|
|
1261
|
-
await (0,telemetry
|
|
1262
|
-
(0,telemetry
|
|
1260
|
+
await (0,telemetry/* initializeAnalyticsIdentityAsync */.PB)();
|
|
1261
|
+
(0,telemetry/* identify */.ls)();
|
|
1263
1262
|
(0,telemetry.track)({
|
|
1264
1263
|
event: telemetry.AnalyticsEventTypes.CREATE_EXPO_APP,
|
|
1265
1264
|
properties: { phase: telemetry.AnalyticsEventPhases.ATTEMPT, example: resolvedExample },
|
|
@@ -1293,22 +1292,22 @@ function getChangeDirectoryPath(projectRoot) {
|
|
|
1293
1292
|
}
|
|
1294
1293
|
async function configureNodeDependenciesAsync(projectRoot, packageManager) {
|
|
1295
1294
|
try {
|
|
1296
|
-
await (0,resolvePackageManager/* configurePackageManager */.
|
|
1295
|
+
await (0,resolvePackageManager/* configurePackageManager */.MZ)(projectRoot, packageManager, { silent: false });
|
|
1297
1296
|
}
|
|
1298
1297
|
catch (error) {
|
|
1299
1298
|
createAsync_debug(`Error configuring package manager: %O`, error);
|
|
1300
|
-
log/* Log
|
|
1301
|
-
log/* Log
|
|
1299
|
+
log/* Log */.tG.error(`Something went wrong configuring the package manager. Check your ${packageManager} logs. Continuing to create the app.`);
|
|
1300
|
+
log/* Log */.tG.exception(error);
|
|
1302
1301
|
}
|
|
1303
1302
|
}
|
|
1304
1303
|
async function installNodeDependenciesAsync(projectRoot, packageManager) {
|
|
1305
1304
|
try {
|
|
1306
|
-
await (0,resolvePackageManager/* installDependenciesAsync */.
|
|
1305
|
+
await (0,resolvePackageManager/* installDependenciesAsync */.DC)(projectRoot, packageManager, { silent: false });
|
|
1307
1306
|
}
|
|
1308
1307
|
catch (error) {
|
|
1309
1308
|
createAsync_debug(`Error installing node modules: %O`, error);
|
|
1310
|
-
log/* Log
|
|
1311
|
-
log/* Log
|
|
1309
|
+
log/* Log */.tG.error(`Something went wrong installing JavaScript dependencies. Check your ${packageManager} logs. Continuing to create the app.`);
|
|
1310
|
+
log/* Log */.tG.exception(error);
|
|
1312
1311
|
}
|
|
1313
1312
|
}
|
|
1314
1313
|
async function installCocoaPodsAsync(projectRoot) {
|
|
@@ -1345,37 +1344,36 @@ function getDeprecatedExampleErrorMessage(example, metadata) {
|
|
|
1345
1344
|
|
|
1346
1345
|
/***/ }),
|
|
1347
1346
|
|
|
1348
|
-
/***/
|
|
1347
|
+
/***/ 9178:
|
|
1349
1348
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1350
1349
|
|
|
1351
|
-
// ESM COMPAT FLAG
|
|
1352
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1353
1350
|
|
|
1354
1351
|
// EXPORTS
|
|
1355
1352
|
__webpack_require__.d(__webpack_exports__, {
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
"track": () => (/* binding */ track)
|
|
1353
|
+
AnalyticsEventPhases: () => (/* binding */ AnalyticsEventPhases),
|
|
1354
|
+
AnalyticsEventTypes: () => (/* binding */ AnalyticsEventTypes),
|
|
1355
|
+
flushAsync: () => (/* binding */ flushAsync),
|
|
1356
|
+
ls: () => (/* binding */ identify),
|
|
1357
|
+
PB: () => (/* binding */ initializeAnalyticsIdentityAsync),
|
|
1358
|
+
track: () => (/* binding */ track)
|
|
1363
1359
|
});
|
|
1364
1360
|
|
|
1361
|
+
// UNUSED EXPORTS: _resetGlobals
|
|
1362
|
+
|
|
1365
1363
|
// EXTERNAL MODULE: ../@expo/json-file/build/JsonFile.js
|
|
1366
|
-
var JsonFile = __webpack_require__(
|
|
1364
|
+
var JsonFile = __webpack_require__(4419);
|
|
1367
1365
|
var JsonFile_default = /*#__PURE__*/__webpack_require__.n(JsonFile);
|
|
1368
1366
|
// EXTERNAL MODULE: external "crypto"
|
|
1369
|
-
var external_crypto_ = __webpack_require__(
|
|
1367
|
+
var external_crypto_ = __webpack_require__(6982);
|
|
1370
1368
|
var external_crypto_default = /*#__PURE__*/__webpack_require__.n(external_crypto_);
|
|
1371
1369
|
// EXTERNAL MODULE: external "fs"
|
|
1372
|
-
var external_fs_ = __webpack_require__(
|
|
1370
|
+
var external_fs_ = __webpack_require__(9896);
|
|
1373
1371
|
var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_);
|
|
1374
1372
|
// EXTERNAL MODULE: external "os"
|
|
1375
|
-
var external_os_ = __webpack_require__(
|
|
1373
|
+
var external_os_ = __webpack_require__(857);
|
|
1376
1374
|
var external_os_default = /*#__PURE__*/__webpack_require__.n(external_os_);
|
|
1377
1375
|
// EXTERNAL MODULE: external "path"
|
|
1378
|
-
var external_path_ = __webpack_require__(
|
|
1376
|
+
var external_path_ = __webpack_require__(6928);
|
|
1379
1377
|
var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_);
|
|
1380
1378
|
;// CONCATENATED MODULE: ./src/paths.ts
|
|
1381
1379
|
|
|
@@ -1417,7 +1415,7 @@ function getSession() {
|
|
|
1417
1415
|
}
|
|
1418
1416
|
|
|
1419
1417
|
// EXTERNAL MODULE: ./src/utils/env.ts
|
|
1420
|
-
var
|
|
1418
|
+
var utils_env = __webpack_require__(4695);
|
|
1421
1419
|
;// CONCATENATED MODULE: ./src/telemetry.ts
|
|
1422
1420
|
|
|
1423
1421
|
|
|
@@ -1426,7 +1424,7 @@ var env = __webpack_require__(7943);
|
|
|
1426
1424
|
|
|
1427
1425
|
|
|
1428
1426
|
|
|
1429
|
-
const packageJSON = __webpack_require__(
|
|
1427
|
+
const packageJSON = __webpack_require__(8330);
|
|
1430
1428
|
const xdlUnifiedWriteKey = '1wabJGd5IiuF9Q8SGlcI90v8WTs';
|
|
1431
1429
|
const analyticsEndpoint = 'https://cdp.expo.dev/v1/batch';
|
|
1432
1430
|
const version = '1.0.0';
|
|
@@ -1435,7 +1433,7 @@ const messageBatch = [];
|
|
|
1435
1433
|
let analyticsIdentity = null;
|
|
1436
1434
|
// jest does not clear global variables inbetween tests so we need this helper
|
|
1437
1435
|
function _resetGlobals() {
|
|
1438
|
-
if (env.
|
|
1436
|
+
if (env.EXPO_NO_TELEMETRY)
|
|
1439
1437
|
return;
|
|
1440
1438
|
analyticsIdentity = null;
|
|
1441
1439
|
messageBatch.splice(0, messageBatch.length);
|
|
@@ -1443,7 +1441,7 @@ function _resetGlobals() {
|
|
|
1443
1441
|
// call before tracking any analytics events.
|
|
1444
1442
|
// if track/identify are called before this method they will be dropped
|
|
1445
1443
|
async function initializeAnalyticsIdentityAsync() {
|
|
1446
|
-
if (
|
|
1444
|
+
if (utils_env.env.EXPO_NO_TELEMETRY)
|
|
1447
1445
|
return;
|
|
1448
1446
|
if (analyticsIdentity) {
|
|
1449
1447
|
return;
|
|
@@ -1451,12 +1449,12 @@ async function initializeAnalyticsIdentityAsync() {
|
|
|
1451
1449
|
analyticsIdentity = await getAnalyticsIdentityAsync();
|
|
1452
1450
|
}
|
|
1453
1451
|
function identify() {
|
|
1454
|
-
if (
|
|
1452
|
+
if (utils_env.env.EXPO_NO_TELEMETRY)
|
|
1455
1453
|
return;
|
|
1456
1454
|
enqueue('identify', {});
|
|
1457
1455
|
}
|
|
1458
1456
|
function track(message) {
|
|
1459
|
-
if (
|
|
1457
|
+
if (utils_env.env.EXPO_NO_TELEMETRY)
|
|
1460
1458
|
return;
|
|
1461
1459
|
enqueue('track', { ...message, context: getAnalyticsContext() });
|
|
1462
1460
|
}
|
|
@@ -1500,7 +1498,7 @@ function enqueue(type, message) {
|
|
|
1500
1498
|
// very barebones implemention...
|
|
1501
1499
|
// does not support multiple concurrent flushes or large numbers of messages
|
|
1502
1500
|
async function flushAsync() {
|
|
1503
|
-
if (
|
|
1501
|
+
if (utils_env.env.EXPO_NO_TELEMETRY)
|
|
1504
1502
|
return;
|
|
1505
1503
|
if (!messageBatch.length) {
|
|
1506
1504
|
return;
|