eas-cli-local-build-plugin 1.0.271 → 18.0.1
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/LICENSE +21 -100
- package/README.md +1 -1
- package/dist/android.d.ts +1 -1
- package/dist/android.js +4 -6
- package/dist/artifacts.js +23 -15
- package/dist/build.js +11 -13
- package/dist/checkRuntime.js +4 -8
- package/dist/config.js +6 -7
- package/dist/exit.js +1 -2
- package/dist/ios.d.ts +1 -1
- package/dist/ios.js +4 -6
- package/dist/logger.d.ts +2 -2
- package/dist/logger.js +11 -13
- package/dist/main.js +2 -3
- package/dist/parseInput.d.ts +1 -1
- package/dist/parseInput.js +2 -3
- package/dist/types.js +0 -1
- package/dist/workingdir.js +1 -2
- package/package.json +22 -23
- package/dist/android.js.map +0 -1
- package/dist/artifacts.js.map +0 -1
- package/dist/build.js.map +0 -1
- package/dist/checkRuntime.js.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/exit.js.map +0 -1
- package/dist/ios.js.map +0 -1
- package/dist/logger.js.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/parseInput.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/workingdir.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,100 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Notice
|
|
23
|
-
|
|
24
|
-
The Business Source License (this document, or the "License") is not an Open
|
|
25
|
-
Source license. However, the Licensed Work will eventually be made available
|
|
26
|
-
under an Open Source License, as stated in this License.
|
|
27
|
-
|
|
28
|
-
License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
|
|
29
|
-
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
30
|
-
|
|
31
|
-
-----------------------------------------------------------------------------
|
|
32
|
-
|
|
33
|
-
Business Source License 1.1
|
|
34
|
-
|
|
35
|
-
Terms
|
|
36
|
-
|
|
37
|
-
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
38
|
-
works, redistribute, and make non-production use of the Licensed Work. The
|
|
39
|
-
Licensor may make an Additional Use Grant, above, permitting limited
|
|
40
|
-
production use.
|
|
41
|
-
|
|
42
|
-
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
43
|
-
available distribution of a specific version of the Licensed Work under this
|
|
44
|
-
License, whichever comes first, the Licensor hereby grants you rights under
|
|
45
|
-
the terms of the Change License, and the rights granted in the paragraph
|
|
46
|
-
above terminate.
|
|
47
|
-
|
|
48
|
-
If your use of the Licensed Work does not comply with the requirements
|
|
49
|
-
currently in effect as described in this License, you must purchase a
|
|
50
|
-
commercial license from the Licensor, its affiliated entities, or authorized
|
|
51
|
-
resellers, or you must refrain from using the Licensed Work.
|
|
52
|
-
|
|
53
|
-
All copies of the original and modified Licensed Work, and derivative works
|
|
54
|
-
of the Licensed Work, are subject to this License. This License applies
|
|
55
|
-
separately for each version of the Licensed Work and the Change Date may vary
|
|
56
|
-
for each version of the Licensed Work released by Licensor.
|
|
57
|
-
|
|
58
|
-
You must conspicuously display this License on each original or modified copy
|
|
59
|
-
of the Licensed Work. If you receive the Licensed Work in original or
|
|
60
|
-
modified form from a third party, the terms and conditions set forth in this
|
|
61
|
-
License apply to your use of that work.
|
|
62
|
-
|
|
63
|
-
Any use of the Licensed Work in violation of this License will automatically
|
|
64
|
-
terminate your rights under this License for the current and all other
|
|
65
|
-
versions of the Licensed Work.
|
|
66
|
-
|
|
67
|
-
This License does not grant you any right in any trademark or logo of
|
|
68
|
-
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
69
|
-
Licensor as expressly required by this License).
|
|
70
|
-
|
|
71
|
-
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
72
|
-
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
73
|
-
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
74
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
75
|
-
TITLE.
|
|
76
|
-
|
|
77
|
-
MariaDB hereby grants you permission to use this License’s text to license
|
|
78
|
-
your works, and to refer to it using the trademark "Business Source License",
|
|
79
|
-
as long as you comply with the Covenants of Licensor below.
|
|
80
|
-
|
|
81
|
-
Covenants of Licensor
|
|
82
|
-
|
|
83
|
-
In consideration of the right to use this License’s text and the "Business
|
|
84
|
-
Source License" name and trademark, Licensor covenants to MariaDB, and to all
|
|
85
|
-
other recipients of the licensed work to be provided by Licensor:
|
|
86
|
-
|
|
87
|
-
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
88
|
-
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
89
|
-
where "compatible" means that software provided under the Change License can
|
|
90
|
-
be included in a program with software provided under GPL Version 2.0 or a
|
|
91
|
-
later version. Licensor may specify additional Change Licenses without
|
|
92
|
-
limitation.
|
|
93
|
-
|
|
94
|
-
2. To either: (a) specify an additional grant of rights to use that does not
|
|
95
|
-
impose any additional restriction on the right granted in this License, as
|
|
96
|
-
the Additional Use Grant; or (b) insert the text "None".
|
|
97
|
-
|
|
98
|
-
3. To specify a Change Date.
|
|
99
|
-
|
|
100
|
-
4. Not to modify this License in any other way.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-present 650 Industries, Inc. (aka Expo)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
package/dist/android.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Android } from '@expo/eas-build-job';
|
|
2
1
|
import { Artifacts } from '@expo/build-tools';
|
|
2
|
+
import { Android } from '@expo/eas-build-job';
|
|
3
3
|
import { BuildParams } from './types';
|
|
4
4
|
export declare function buildAndroidAsync(job: Android.Job, { workingdir, env: baseEnv, metadata, logger }: BuildParams): Promise<Artifacts>;
|
package/dist/android.js
CHANGED
|
@@ -4,16 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.buildAndroidAsync = buildAndroidAsync;
|
|
7
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
8
7
|
const build_tools_1 = require("@expo/build-tools");
|
|
8
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
9
9
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
10
|
-
const logger_1 = require("./logger");
|
|
11
10
|
const artifacts_1 = require("./artifacts");
|
|
12
11
|
const config_1 = __importDefault(require("./config"));
|
|
12
|
+
const logger_1 = require("./logger");
|
|
13
13
|
async function buildAndroidAsync(job, { workingdir, env: baseEnv, metadata, logger }) {
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const versionCode = (_b = job.version) === null || _b === void 0 ? void 0 : _b.versionCode;
|
|
14
|
+
const versionName = job.version?.versionName;
|
|
15
|
+
const versionCode = job.version?.versionCode;
|
|
17
16
|
const env = {
|
|
18
17
|
...baseEnv,
|
|
19
18
|
...(versionCode && { EAS_BUILD_ANDROID_VERSION_CODE: versionCode }),
|
|
@@ -43,4 +42,3 @@ async function buildAndroidAsync(job, { workingdir, env: baseEnv, metadata, logg
|
|
|
43
42
|
});
|
|
44
43
|
return await build_tools_1.Builders.androidBuilder(ctx);
|
|
45
44
|
}
|
|
46
|
-
//# sourceMappingURL=android.js.map
|
package/dist/artifacts.js
CHANGED
|
@@ -15,26 +15,35 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
37
|
};
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.prepareArtifacts = prepareArtifacts;
|
|
30
|
-
const path_1 = __importDefault(require("path"));
|
|
31
40
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
41
|
+
const path_1 = __importDefault(require("path"));
|
|
32
42
|
const tar = __importStar(require("tar"));
|
|
33
43
|
const config_1 = __importDefault(require("./config"));
|
|
34
44
|
async function prepareArtifacts(artifactPaths, logger) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
l === null || l === void 0 ? void 0 : l.info('Preparing artifacts');
|
|
45
|
+
const l = logger?.child({ phase: 'PREPARE_ARTIFACTS' });
|
|
46
|
+
l?.info('Preparing artifacts');
|
|
38
47
|
let suffix;
|
|
39
48
|
let localPath;
|
|
40
49
|
if (artifactPaths.length === 1 && !(await fs_extra_1.default.lstat(artifactPaths[0])).isDirectory()) {
|
|
@@ -43,7 +52,7 @@ async function prepareArtifacts(artifactPaths, logger) {
|
|
|
43
52
|
}
|
|
44
53
|
else {
|
|
45
54
|
const parentDir = artifactPaths.reduce((acc, item) => getCommonParentDir(acc, item), artifactPaths[0]);
|
|
46
|
-
const relativePathsToArchive = artifactPaths.map(
|
|
55
|
+
const relativePathsToArchive = artifactPaths.map(absolute => path_1.default.relative(parentDir, absolute));
|
|
47
56
|
const archivePath = path_1.default.join(config_1.default.workingdir, 'artifacts.tar.gz');
|
|
48
57
|
await tar.c({
|
|
49
58
|
gzip: true,
|
|
@@ -54,9 +63,9 @@ async function prepareArtifacts(artifactPaths, logger) {
|
|
|
54
63
|
localPath = archivePath;
|
|
55
64
|
}
|
|
56
65
|
const artifactName = `build-${Date.now()}${suffix}`;
|
|
57
|
-
const destPath =
|
|
66
|
+
const destPath = config_1.default.artifactPath ?? path_1.default.join(config_1.default.artifactsDir, artifactName);
|
|
58
67
|
await fs_extra_1.default.copy(localPath, destPath);
|
|
59
|
-
l
|
|
68
|
+
l?.info({ phase: 'PREPARE_ARTIFACTS' }, `Writing artifacts to ${destPath}`);
|
|
60
69
|
return { filename: destPath };
|
|
61
70
|
}
|
|
62
71
|
function getCommonParentDir(path1, path2) {
|
|
@@ -71,4 +80,3 @@ function getCommonParentDir(path1, path2) {
|
|
|
71
80
|
}
|
|
72
81
|
return '/';
|
|
73
82
|
}
|
|
74
|
-
//# sourceMappingURL=artifacts.js.map
|
package/dist/build.js
CHANGED
|
@@ -4,20 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.buildAsync = buildAsync;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
9
|
-
const pickBy_1 = __importDefault(require("lodash/pickBy"));
|
|
10
|
-
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
12
7
|
const build_tools_1 = require("@expo/build-tools");
|
|
8
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
13
9
|
const bunyan_1 = require("bunyan");
|
|
10
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
11
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
12
|
+
const pickBy_1 = __importDefault(require("lodash/pickBy"));
|
|
13
|
+
const path_1 = __importDefault(require("path"));
|
|
14
14
|
const android_1 = require("./android");
|
|
15
15
|
const config_1 = __importDefault(require("./config"));
|
|
16
16
|
const ios_1 = require("./ios");
|
|
17
|
-
const workingdir_1 = require("./workingdir");
|
|
18
17
|
const logger_1 = require("./logger");
|
|
18
|
+
const workingdir_1 = require("./workingdir");
|
|
19
19
|
async function buildAsync(job, metadata) {
|
|
20
|
-
var _a, _b, _c, _d, _e;
|
|
21
20
|
const logger = (0, logger_1.createLogger)(job.loggerLevel);
|
|
22
21
|
const workingdir = await (0, workingdir_1.prepareWorkingdirAsync)({ logger });
|
|
23
22
|
try {
|
|
@@ -29,7 +28,7 @@ async function buildAsync(job, metadata) {
|
|
|
29
28
|
// https://github.com/expo/turtle-v2/blob/main/src/services/worker/src/env.ts
|
|
30
29
|
const unfilteredEnv = {
|
|
31
30
|
...process.env,
|
|
32
|
-
...
|
|
31
|
+
...job.builderEnvironment?.env,
|
|
33
32
|
// We don't use Node.js mirror locally, but a user might
|
|
34
33
|
NVM_NODEJS_ORG_MIRROR: process.env.NVM_NODEJS_ORG_MIRROR,
|
|
35
34
|
EAS_BUILD: '1',
|
|
@@ -40,12 +39,12 @@ async function buildAsync(job, metadata) {
|
|
|
40
39
|
EAS_BUILD_GIT_COMMIT_HASH: metadata.gitCommitHash,
|
|
41
40
|
EAS_BUILD_USERNAME: username,
|
|
42
41
|
...(job.platform === eas_build_job_1.Platform.ANDROID && {
|
|
43
|
-
EAS_BUILD_ANDROID_VERSION_CODE:
|
|
44
|
-
EAS_BUILD_ANDROID_VERSION_NAME:
|
|
42
|
+
EAS_BUILD_ANDROID_VERSION_CODE: job.version?.versionCode,
|
|
43
|
+
EAS_BUILD_ANDROID_VERSION_NAME: job.version?.versionName,
|
|
45
44
|
}),
|
|
46
45
|
...(job.platform === eas_build_job_1.Platform.IOS && {
|
|
47
|
-
EAS_BUILD_IOS_BUILD_NUMBER:
|
|
48
|
-
EAS_BUILD_IOS_APP_VERSION:
|
|
46
|
+
EAS_BUILD_IOS_BUILD_NUMBER: job.version?.buildNumber,
|
|
47
|
+
EAS_BUILD_IOS_APP_VERSION: job.version?.appVersion,
|
|
49
48
|
}),
|
|
50
49
|
};
|
|
51
50
|
const env = (0, pickBy_1.default)(unfilteredEnv, (val) => !!val);
|
|
@@ -92,4 +91,3 @@ async function buildAsync(job, metadata) {
|
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
}
|
|
95
|
-
//# sourceMappingURL=build.js.map
|
package/dist/checkRuntime.js
CHANGED
|
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.checkRuntimeAsync = checkRuntimeAsync;
|
|
7
7
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
8
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
9
8
|
const spawn_async_1 = __importDefault(require("@expo/spawn-async"));
|
|
9
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
10
10
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
11
11
|
function warn(msg) {
|
|
12
12
|
console.log(chalk_1.default.yellow(msg));
|
|
@@ -28,11 +28,10 @@ const validators = [
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
async checkAsync(job) {
|
|
31
|
-
var _a;
|
|
32
31
|
try {
|
|
33
32
|
const version = (await (0, spawn_async_1.default)('node', ['--version'], { stdio: 'pipe' })).stdout.trim();
|
|
34
33
|
const sanitizedVersion = version.startsWith('v') ? version.slice(1) : version;
|
|
35
|
-
const versionFromJob =
|
|
34
|
+
const versionFromJob = job.builderEnvironment?.node;
|
|
36
35
|
if (versionFromJob) {
|
|
37
36
|
const sanitizedVersionFromJob = versionFromJob.startsWith('v')
|
|
38
37
|
? versionFromJob.slice(1)
|
|
@@ -50,8 +49,7 @@ const validators = [
|
|
|
50
49
|
},
|
|
51
50
|
{
|
|
52
51
|
async checkAsync(job) {
|
|
53
|
-
|
|
54
|
-
const versionFromJob = (_a = job.builderEnvironment) === null || _a === void 0 ? void 0 : _a.yarn;
|
|
52
|
+
const versionFromJob = job.builderEnvironment?.yarn;
|
|
55
53
|
if (!versionFromJob) {
|
|
56
54
|
return;
|
|
57
55
|
}
|
|
@@ -102,10 +100,9 @@ const validators = [
|
|
|
102
100
|
{
|
|
103
101
|
platform: eas_build_job_1.Platform.IOS,
|
|
104
102
|
async checkAsync(job) {
|
|
105
|
-
var _a;
|
|
106
103
|
try {
|
|
107
104
|
const version = (await (0, spawn_async_1.default)('pod', ['--version'], { stdio: 'pipe' })).stdout.trim();
|
|
108
|
-
const versionFromJob = job.platform === eas_build_job_1.Platform.IOS &&
|
|
105
|
+
const versionFromJob = job.platform === eas_build_job_1.Platform.IOS && job.builderEnvironment?.cocoapods;
|
|
109
106
|
if (versionFromJob && versionFromJob !== version) {
|
|
110
107
|
warn('Cocoapods version in your eas.json does not match the version currently installed in your system');
|
|
111
108
|
}
|
|
@@ -124,4 +121,3 @@ async function checkRuntimeAsync(job) {
|
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
123
|
}
|
|
127
|
-
//# sourceMappingURL=checkRuntime.js.map
|
package/dist/config.js
CHANGED
|
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const logger_1 = require("@expo/logger");
|
|
7
|
+
const env_paths_1 = __importDefault(require("env-paths"));
|
|
6
8
|
const path_1 = __importDefault(require("path"));
|
|
7
9
|
const uuid_1 = require("uuid");
|
|
8
|
-
const env_paths_1 = __importDefault(require("env-paths"));
|
|
9
|
-
const logger_1 = require("@expo/logger");
|
|
10
10
|
const { temp } = (0, env_paths_1.default)('eas-build-local');
|
|
11
11
|
const envWorkingdir = process.env.EAS_LOCAL_BUILD_WORKINGDIR;
|
|
12
12
|
const envSkipCleanup = process.env.EAS_LOCAL_BUILD_SKIP_CLEANUP;
|
|
@@ -16,18 +16,17 @@ const envArtifactPath = process.env.EAS_LOCAL_BUILD_ARTIFACT_PATH;
|
|
|
16
16
|
if (process.env.EAS_LOCAL_BUILD_LOGGER_LEVEL &&
|
|
17
17
|
!Object.values(logger_1.LoggerLevel).includes(process.env.EAS_LOCAL_BUILD_LOGGER_LEVEL)) {
|
|
18
18
|
throw new Error(`Invalid value for EAS_LOCAL_BUILD_LOGGER_LEVEL, one of ${Object.values(logger_1.LoggerLevel)
|
|
19
|
-
.map(
|
|
19
|
+
.map(ll => `"${ll}"`)
|
|
20
20
|
.join(', ')} is expected`);
|
|
21
21
|
}
|
|
22
22
|
const envLoggerLevel = process.env.EAS_LOCAL_BUILD_LOGGER_LEVEL;
|
|
23
23
|
exports.default = {
|
|
24
|
-
workingdir: envWorkingdir
|
|
24
|
+
workingdir: envWorkingdir ?? path_1.default.join(temp, (0, uuid_1.v4)()),
|
|
25
25
|
skipCleanup: envSkipCleanup === '1',
|
|
26
26
|
skipNativeBuild: envSkipNativeBuild === '1',
|
|
27
|
-
artifactsDir: envArtifactsDir
|
|
27
|
+
artifactsDir: envArtifactsDir ?? process.cwd(),
|
|
28
28
|
artifactPath: envArtifactPath,
|
|
29
29
|
logger: {
|
|
30
|
-
defaultLoggerLevel: envLoggerLevel
|
|
30
|
+
defaultLoggerLevel: envLoggerLevel ?? logger_1.LoggerLevel.INFO,
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=config.js.map
|
package/dist/exit.js
CHANGED
|
@@ -18,7 +18,7 @@ function listenForInterrupts() {
|
|
|
18
18
|
handlerInProgress = true;
|
|
19
19
|
(0, logger_1.createLogger)().error({ phase: 'ABORT' }, 'Received termination signal.');
|
|
20
20
|
shouldExitStatus = true;
|
|
21
|
-
await Promise.allSettled(handlers.map(
|
|
21
|
+
await Promise.allSettled(handlers.map(handler => {
|
|
22
22
|
return handler();
|
|
23
23
|
}));
|
|
24
24
|
}
|
|
@@ -36,4 +36,3 @@ function registerHandler(fn) {
|
|
|
36
36
|
function shouldExit() {
|
|
37
37
|
return shouldExitStatus;
|
|
38
38
|
}
|
|
39
|
-
//# sourceMappingURL=exit.js.map
|
package/dist/ios.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ios } from '@expo/eas-build-job';
|
|
2
1
|
import { Artifacts } from '@expo/build-tools';
|
|
2
|
+
import { Ios } from '@expo/eas-build-job';
|
|
3
3
|
import { BuildParams } from './types';
|
|
4
4
|
export declare function buildIosAsync(job: Ios.Job, { workingdir, env: baseEnv, metadata, logger }: BuildParams): Promise<Artifacts>;
|
package/dist/ios.js
CHANGED
|
@@ -4,16 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.buildIosAsync = buildIosAsync;
|
|
7
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
8
7
|
const build_tools_1 = require("@expo/build-tools");
|
|
8
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
9
9
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
10
|
-
const logger_1 = require("./logger");
|
|
11
10
|
const artifacts_1 = require("./artifacts");
|
|
12
11
|
const config_1 = __importDefault(require("./config"));
|
|
12
|
+
const logger_1 = require("./logger");
|
|
13
13
|
async function buildIosAsync(job, { workingdir, env: baseEnv, metadata, logger }) {
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
const appVersion = (_b = job.version) === null || _b === void 0 ? void 0 : _b.appVersion;
|
|
14
|
+
const buildNumber = job.version?.buildNumber;
|
|
15
|
+
const appVersion = job.version?.appVersion;
|
|
17
16
|
const env = {
|
|
18
17
|
...baseEnv,
|
|
19
18
|
...(buildNumber && { EAS_BUILD_IOS_BUILD_NUMBER: buildNumber }),
|
|
@@ -43,4 +42,3 @@ async function buildIosAsync(job, { workingdir, env: baseEnv, metadata, logger }
|
|
|
43
42
|
});
|
|
44
43
|
return await build_tools_1.Builders.iosBuilder(ctx);
|
|
45
44
|
}
|
|
46
|
-
//# sourceMappingURL=ios.js.map
|
package/dist/logger.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Writable } from 'stream';
|
|
2
|
-
import bunyan from 'bunyan';
|
|
3
1
|
import { LogBuffer } from '@expo/build-tools';
|
|
4
2
|
import { LoggerLevel } from '@expo/logger';
|
|
3
|
+
import bunyan from 'bunyan';
|
|
4
|
+
import { Writable } from 'stream';
|
|
5
5
|
interface CachedLog {
|
|
6
6
|
msg: string;
|
|
7
7
|
phase: string;
|
package/dist/logger.js
CHANGED
|
@@ -5,31 +5,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.logBuffer = void 0;
|
|
7
7
|
exports.createLogger = createLogger;
|
|
8
|
-
const
|
|
8
|
+
const logger_1 = require("@expo/logger");
|
|
9
9
|
const bunyan_1 = __importDefault(require("bunyan"));
|
|
10
10
|
const chalk_1 = __importDefault(require("chalk"));
|
|
11
11
|
const omit_1 = __importDefault(require("lodash/omit"));
|
|
12
|
-
const
|
|
12
|
+
const stream_1 = require("stream");
|
|
13
13
|
const config_1 = __importDefault(require("./config"));
|
|
14
14
|
const MAX_LINES_IN_BUFFER = 100;
|
|
15
15
|
class BuildCliLogBuffer extends stream_1.Writable {
|
|
16
|
+
numberOfLines;
|
|
17
|
+
writable = true;
|
|
18
|
+
buffer = [];
|
|
16
19
|
constructor(numberOfLines) {
|
|
17
20
|
super();
|
|
18
21
|
this.numberOfLines = numberOfLines;
|
|
19
|
-
this.writable = true;
|
|
20
|
-
this.buffer = [];
|
|
21
22
|
}
|
|
22
23
|
write(rec) {
|
|
23
|
-
var _a;
|
|
24
24
|
if (
|
|
25
25
|
// verify required fields
|
|
26
26
|
typeof rec !== 'object' ||
|
|
27
|
-
typeof
|
|
28
|
-
typeof
|
|
27
|
+
typeof rec?.msg !== 'string' ||
|
|
28
|
+
typeof rec?.phase !== 'string' ||
|
|
29
29
|
// use only logs from spawn commands
|
|
30
|
-
(
|
|
30
|
+
(rec?.source !== 'stdout' && rec?.source !== 'stderr') ||
|
|
31
31
|
// skip all short lines (it could potentially be some loader)
|
|
32
|
-
(
|
|
32
|
+
(rec?.msg ?? '').length < 3) {
|
|
33
33
|
return true;
|
|
34
34
|
}
|
|
35
35
|
if (this.buffer.length >= this.numberOfLines) {
|
|
@@ -47,7 +47,6 @@ class BuildCliLogBuffer extends stream_1.Writable {
|
|
|
47
47
|
}
|
|
48
48
|
class PrettyStream extends stream_1.Writable {
|
|
49
49
|
write(rawLog) {
|
|
50
|
-
var _a;
|
|
51
50
|
const log = JSON.parse(rawLog);
|
|
52
51
|
if (log.marker) {
|
|
53
52
|
return true;
|
|
@@ -81,7 +80,7 @@ class PrettyStream extends stream_1.Writable {
|
|
|
81
80
|
// substring removes `{\n` and `\n}`
|
|
82
81
|
console.log(chalk_1.default.gray(str.substring(2, str.length - 2)));
|
|
83
82
|
}
|
|
84
|
-
if (
|
|
83
|
+
if (log?.err?.stack) {
|
|
85
84
|
console.error(chalk_1.default.red(log.err.stack));
|
|
86
85
|
}
|
|
87
86
|
return true;
|
|
@@ -118,7 +117,7 @@ function createLogger(level) {
|
|
|
118
117
|
serializers: bunyan_1.default.stdSerializers,
|
|
119
118
|
streams: [
|
|
120
119
|
{
|
|
121
|
-
level: level
|
|
120
|
+
level: level ?? config_1.default.logger.defaultLoggerLevel,
|
|
122
121
|
stream: new PrettyStream(),
|
|
123
122
|
},
|
|
124
123
|
{
|
|
@@ -128,4 +127,3 @@ function createLogger(level) {
|
|
|
128
127
|
],
|
|
129
128
|
});
|
|
130
129
|
}
|
|
131
|
-
//# sourceMappingURL=logger.js.map
|
package/dist/main.js
CHANGED
|
@@ -4,10 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const chalk_1 = __importDefault(require("chalk"));
|
|
7
|
-
const parseInput_1 = require("./parseInput");
|
|
8
7
|
const build_1 = require("./build");
|
|
9
|
-
const exit_1 = require("./exit");
|
|
10
8
|
const checkRuntime_1 = require("./checkRuntime");
|
|
9
|
+
const exit_1 = require("./exit");
|
|
10
|
+
const parseInput_1 = require("./parseInput");
|
|
11
11
|
(0, exit_1.listenForInterrupts)();
|
|
12
12
|
async function main() {
|
|
13
13
|
try {
|
|
@@ -24,4 +24,3 @@ async function main() {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
void main();
|
|
27
|
-
//# sourceMappingURL=main.js.map
|
package/dist/parseInput.d.ts
CHANGED
package/dist/parseInput.js
CHANGED
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.parseInputAsync = parseInputAsync;
|
|
7
7
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
8
|
-
const joi_1 = __importDefault(require("joi"));
|
|
9
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
10
9
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
10
|
+
const joi_1 = __importDefault(require("joi"));
|
|
11
11
|
const exit_1 = require("./exit");
|
|
12
12
|
const packageJson = require('../package.json');
|
|
13
13
|
const ParamsSchema = joi_1.default.object({
|
|
@@ -15,7 +15,7 @@ const ParamsSchema = joi_1.default.object({
|
|
|
15
15
|
metadata: joi_1.default.object().unknown(),
|
|
16
16
|
});
|
|
17
17
|
async function parseInputAsync() {
|
|
18
|
-
if (process.argv.findIndex(
|
|
18
|
+
if (process.argv.findIndex(arg => arg === '--version' || arg === '-v') !== -1) {
|
|
19
19
|
console.log(packageJson.version);
|
|
20
20
|
process.exit(0);
|
|
21
21
|
}
|
|
@@ -63,4 +63,3 @@ function validateParams(params) {
|
|
|
63
63
|
function displayHelp() {
|
|
64
64
|
console.log(`This tool is not intended for standalone use, it will be used internally by ${chalk_1.default.bold('eas-cli')} when building with flag ${chalk_1.default.bold('--local')}.`);
|
|
65
65
|
}
|
|
66
|
-
//# sourceMappingURL=parseInput.js.map
|
package/dist/types.js
CHANGED
package/dist/workingdir.js
CHANGED
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.prepareWorkingdirAsync = prepareWorkingdirAsync;
|
|
7
|
-
const path_1 = __importDefault(require("path"));
|
|
8
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
9
8
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const config_1 = __importDefault(require("./config"));
|
|
11
11
|
const exit_1 = require("./exit");
|
|
12
12
|
async function prepareWorkingdirAsync({ logger }) {
|
|
@@ -31,4 +31,3 @@ async function prepareWorkingdirAsync({ logger }) {
|
|
|
31
31
|
});
|
|
32
32
|
return workingdir;
|
|
33
33
|
}
|
|
34
|
-
//# sourceMappingURL=workingdir.js.map
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eas-cli-local-build-plugin",
|
|
3
|
+
"version": "18.0.1",
|
|
4
|
+
"description": "Tool for running EAS compatible builds on a local machine.",
|
|
5
|
+
"bugs": "https://github.com/expo/eas-cli/issues",
|
|
6
|
+
"license": "BUSL-1.1",
|
|
7
|
+
"author": "Expo <support@expo.io>",
|
|
3
8
|
"repository": {
|
|
4
9
|
"type": "git",
|
|
5
|
-
"url": "https://github.com/expo/eas-
|
|
10
|
+
"url": "https://github.com/expo/eas-cli.git",
|
|
6
11
|
"directory": "packages/local-build-plugin"
|
|
7
12
|
},
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
"bin": {
|
|
14
|
+
"eas-cli-local-build-plugin": "./bin/run"
|
|
15
|
+
},
|
|
11
16
|
"files": [
|
|
12
17
|
"dist",
|
|
13
18
|
"bin"
|
|
14
19
|
],
|
|
15
|
-
"
|
|
16
|
-
"eas-cli-local-build-plugin": "./bin/run"
|
|
17
|
-
},
|
|
20
|
+
"main": "dist/main.js",
|
|
18
21
|
"scripts": {
|
|
19
22
|
"start": "yarn watch",
|
|
20
23
|
"watch": "tsc --watch --preserveWatchOutput",
|
|
21
24
|
"build": "tsc",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"node": ">=18"
|
|
25
|
+
"typecheck": "tsc",
|
|
26
|
+
"prepack": "rm -rf dist *.tsbuildinfo && tsc -p tsconfig.build.json",
|
|
27
|
+
"test": "jest --passWithNoTests",
|
|
28
|
+
"clean": "rm -rf node_modules dist coverage *.tsbuildinfo"
|
|
27
29
|
},
|
|
28
|
-
"author": "Expo <support@expo.io>",
|
|
29
|
-
"bugs": "https://github.com/expo/eas-build/issues",
|
|
30
|
-
"license": "BUSL-1.1",
|
|
31
30
|
"dependencies": {
|
|
32
|
-
"@expo/build-tools": "
|
|
33
|
-
"@expo/eas-build-job": "
|
|
31
|
+
"@expo/build-tools": "18.0.1",
|
|
32
|
+
"@expo/eas-build-job": "18.0.1",
|
|
33
|
+
"@expo/logger": "18.0.1",
|
|
34
34
|
"@expo/spawn-async": "^1.7.2",
|
|
35
|
-
"@expo/turtle-spawn": "
|
|
35
|
+
"@expo/turtle-spawn": "18.0.1",
|
|
36
36
|
"bunyan": "^1.8.15",
|
|
37
37
|
"chalk": "4.1.2",
|
|
38
38
|
"env-paths": "^2.2.1",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"lodash": "^4.17.21",
|
|
42
42
|
"nullthrows": "^1.1.1",
|
|
43
43
|
"semver": "^7.6.2",
|
|
44
|
-
"tar": "
|
|
44
|
+
"tar": "7.5.7",
|
|
45
45
|
"uuid": "^9.0.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -55,9 +55,8 @@
|
|
|
55
55
|
"ts-jest": "^29.1.4",
|
|
56
56
|
"typescript": "^5.5.4"
|
|
57
57
|
},
|
|
58
|
-
"
|
|
59
|
-
"node": "
|
|
60
|
-
"yarn": "1.22.21"
|
|
58
|
+
"engines": {
|
|
59
|
+
"node": ">=18"
|
|
61
60
|
},
|
|
62
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "772d4dd654a71b0d88e73341106d417222dd401e"
|
|
63
62
|
}
|
package/dist/android.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"android.js","sourceRoot":"","sources":["../src/android.ts"],"names":[],"mappings":";;;;;AASA,8CAkCC;AA3CD,uDAAoF;AACpF,mDAAsE;AACtE,uDAA+B;AAE/B,qCAAqC;AAErC,2CAA+C;AAC/C,sDAA8B;AAEvB,KAAK,UAAU,iBAAiB,CACrC,GAAgB,EAChB,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAe;;IAE3D,MAAM,WAAW,GAAG,MAAA,GAAG,CAAC,OAAO,0CAAE,WAAW,CAAC;IAC7C,MAAM,WAAW,GAAG,MAAA,GAAG,CAAC,OAAO,0CAAE,WAAW,CAAC;IAC7C,MAAM,GAAG,GAAQ;QACf,GAAG,OAAO;QACV,GAAG,CAAC,WAAW,IAAI,EAAE,8BAA8B,EAAE,WAAW,EAAE,CAAC;QACnE,GAAG,CAAC,WAAW,IAAI,EAAE,8BAA8B,EAAE,WAAW,EAAE,CAAC;KACpE,CAAC;IACF,MAAM,GAAG,GAAG,IAAI,0BAAY,CAAc,GAAG,EAAE;QAC7C,UAAU;QACV,MAAM;QACN,SAAS,EAAT,kBAAS;QACT,cAAc,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE;YAC7C,IAAI,QAAQ,CAAC,IAAI,KAAK,mCAAmB,CAAC,mBAAmB,EAAE,CAAC;gBAC9D,OAAO,MAAM,IAAA,4BAAgB,EAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YACxD,CAAC;iBAAM,IAAI,QAAQ,CAAC,IAAI,KAAK,mCAAmB,CAAC,eAAe,EAAE,CAAC;gBACjE,OAAO,MAAM,IAAA,4BAAgB,EAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YACxD,CAAC;iBAAM,CAAC;gBACN,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC5B,CAAC;QACH,CAAC;QACD,GAAG;QACH,QAAQ;QACR,eAAe,EAAE,gBAAM,CAAC,eAAe;KACxC,CAAC,CAAC;IAEH,MAAM,GAAG,CAAC,aAAa,CAAC,0BAAU,CAAC,WAAW,EAAE,KAAK,IAAI,EAAE;QACzD,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAA,cAAI,EAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC;IACvE,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,sBAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import { Android, ManagedArtifactType, BuildPhase, Env } from '@expo/eas-build-job';\nimport { Builders, BuildContext, Artifacts } from '@expo/build-tools';\nimport omit from 'lodash/omit';\n\nimport { logBuffer } from './logger';\nimport { BuildParams } from './types';\nimport { prepareArtifacts } from './artifacts';\nimport config from './config';\n\nexport async function buildAndroidAsync(\n job: Android.Job,\n { workingdir, env: baseEnv, metadata, logger }: BuildParams\n): Promise<Artifacts> {\n const versionName = job.version?.versionName;\n const versionCode = job.version?.versionCode;\n const env: Env = {\n ...baseEnv,\n ...(versionCode && { EAS_BUILD_ANDROID_VERSION_CODE: versionCode }),\n ...(versionName && { EAS_BUILD_ANDROID_VERSION_NAME: versionName }),\n };\n const ctx = new BuildContext<Android.Job>(job, {\n workingdir,\n logger,\n logBuffer,\n uploadArtifact: async ({ artifact, logger }) => {\n if (artifact.type === ManagedArtifactType.APPLICATION_ARCHIVE) {\n return await prepareArtifacts(artifact.paths, logger);\n } else if (artifact.type === ManagedArtifactType.BUILD_ARTIFACTS) {\n return await prepareArtifacts(artifact.paths, logger);\n } else {\n return { filename: null };\n }\n },\n env,\n metadata,\n skipNativeBuild: config.skipNativeBuild,\n });\n\n await ctx.runBuildPhase(BuildPhase.START_BUILD, async () => {\n ctx.logger.info({ job: omit(ctx.job, 'secrets') }, 'Starting build');\n });\n\n return await Builders.androidBuilder(ctx);\n}\n"]}
|
package/dist/artifacts.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,4CAqCC;AA7CD,gDAAwB;AAGxB,wDAA0B;AAC1B,yCAA2B;AAE3B,sDAA8B;AAEvB,KAAK,UAAU,gBAAgB,CACpC,aAAuB,EACvB,MAAe;;IAEf,MAAM,CAAC,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAC,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACxD,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;IAC/B,IAAI,MAAM,CAAC;IACX,IAAI,SAAS,CAAC;IACd,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,kBAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;QACpF,CAAC,SAAS,CAAC,GAAG,aAAa,CAAC;QAC5B,MAAM,GAAG,cAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC;SAAM,CAAC;QACN,MAAM,SAAS,GAAG,aAAa,CAA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AI,OAAO,GAAG,cAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAC5C,OAAO,OAAO,KAAK,GAAG,EAAE,CAAC;QACvB,IAAI,eAAe,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;YACxC,OAAO,OAAO,CAAC;QACjB,CAAC;QACD,OAAO,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import path from 'path';\n\nimport { bunyan } from '@expo/logger';\nimport fs from 'fs-extra';\nimport * as tar from 'tar';\n\nimport config from './config';\n\nexport async function prepareArtifacts(\n artifactPaths: string[],\n logger?: bunyan\n): Promise<{ filename: string }> {\n const l = logger?.child({ phase: 'PREPARE_ARTIFACTS' });\n l?.info('Preparing artifacts');\n let suffix;\n let localPath;\n if (artifactPaths.length === 1 && !(await fs.lstat(artifactPaths[0])).isDirectory()) {\n [localPath] = artifactPaths;\n suffix = path.extname(artifactPaths[0]);\n } else {\n const parentDir = artifactPaths.reduce(\n (acc, item) => getCommonParentDir(acc, item),\n artifactPaths[0]\n );\n const relativePathsToArchive = artifactPaths.map((absolute) =>\n path.relative(parentDir, absolute)\n );\n\n const archivePath = path.join(config.workingdir, 'artifacts.tar.gz');\n await tar.c(\n {\n gzip: true,\n file: archivePath,\n cwd: parentDir,\n },\n relativePathsToArchive\n );\n suffix = '.tar.gz';\n localPath = archivePath;\n }\n const artifactName = `build-${Date.now()}${suffix}`;\n const destPath = config.artifactPath ?? path.join(config.artifactsDir, artifactName);\n await fs.copy(localPath, destPath);\n l?.info({ phase: 'PREPARE_ARTIFACTS' }, `Writing artifacts to ${destPath}`);\n return { filename: destPath };\n}\n\nfunction getCommonParentDir(path1: string, path2: string): string {\n const normalizedPath1 = path.normalize(path1);\n const normalizedPath2 = path.normalize(path2);\n let current = path.dirname(normalizedPath1);\n while (current !== '/') {\n if (normalizedPath2.startsWith(current)) {\n return current;\n }\n current = path.dirname(current);\n }\n return '/';\n}\n"]}
|
package/dist/build.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":";;;;;AAeA,gCA4EC;AA3FD,gDAAwB;AAExB,uDAAgG;AAChG,2DAAmC;AACnC,wDAA0B;AAC1B,kDAA0B;AAC1B,mDAAoE;AACpE,mCAA+B;AAE/B,uCAA8C;AAC9C,sDAA8B;AAC9B,+BAAsC;AACtC,6CAAsD;AACtD,qCAAwC;AAEjC,KAAK,UAAU,UAAU,CAAC,GAAa,EAAE,QAAkB;;IAChE,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,MAAM,IAAA,mCAAsB,EAAC,EAAE,MAAM,EAAE,CAAC,CAAC;IAE5D,IAAI,CAAC;QACH,IAAI,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;QACjC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC,IAAI,KAAK,wBAAQ,CAAC,OAAO,EAAE,CAAC;YAC/C,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC1B,CAAC;QAED,oCAAoC;QACpC,6EAA6E;QAC7E,MAAM,aAAa,GAAuC;YACxD,GAAG,OAAO,CAAC,GAAG;YACd,GAAG,MAAA,GAAG,CAAC,kBAAkB,0CAAE,GAAG;YAC9B,wDAAwD;YACxD,qBAAqB,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB;YACxD,SAAS,EAAE,GAAG;YACd,gBAAgB,EAAE,oBAAoB;YACtC,kBAAkB,EAAE,GAAG,CAAC,QAAQ;YAChC,oBAAoB,EAAE,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC;YACpD,iBAAiB,EAAE,QAAQ,CAAC,YAAY;YACxC,yBAAyB,EAAE,QAAQ,CAAC,aAAa;YACjD,kBAAkB,EAAE,QAA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,CAAC,GAAG,CACT,eAAK,CAAC,KAAK,CAAC,uCAAuC,SAAS,CAAC,mBAAmB,EAAE,CAAC,CACpF,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,IAAI,CAAC,YAAY,kCAAoB,EAAE,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YACvB,OAAO;QACT,CAAC;QACD,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;QACzC,IAAI,MAAM,CAAC,KAAK,EAAE,KAAK,cAAK,EAAE,CAAC;YAC7B,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QAC9B,CAAC;QACD,MAAM,CAAC,CAAC;IACV,CAAC;YAAS,CAAC;QACT,IAAI,CAAC,gBAAM,CAAC,WAAW,EAAE,CAAC;YACxB,MAAM,kBAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,MAAM,CAAC,qBAAqB,UAAU,oBAAoB,CAAC,CAAC,CAAC;QACnF,CAAC;QACD,IAAI,GAAG,CAAC,cAAc,CAAC,IAAI,KAAK,iCAAiB,CAAC,IAAI,EAAE,CAAC;YACvD,MAAM,kBAAE,CAAC,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["import path from 'path';\n\nimport { BuildJob, Platform, ArchiveSourceType, Metadata, Workflow } from '@expo/eas-build-job';\nimport pickBy from 'lodash/pickBy';\nimport fs from 'fs-extra';\nimport chalk from 'chalk';\nimport { Artifacts, SkipNativeBuildError } from '@expo/build-tools';\nimport { DEBUG } from 'bunyan';\n\nimport { buildAndroidAsync } from './android';\nimport config from './config';\nimport { buildIosAsync } from './ios';\nimport { prepareWorkingdirAsync } from './workingdir';\nimport { createLogger } from './logger';\n\nexport async function buildAsync(job: BuildJob, metadata: Metadata): Promise<void> {\n const logger = createLogger(job.loggerLevel);\n const workingdir = await prepareWorkingdirAsync({ logger });\n\n try {\n let username = metadata.username;\n if (!username && job.type === Workflow.MANAGED) {\n username = job.username;\n }\n\n // keep in sync with worker env vars\n // https://github.com/expo/turtle-v2/blob/main/src/services/worker/src/env.ts\n const unfilteredEnv: Record<string, string | undefined> = {\n ...process.env,\n ...job.builderEnvironment?.env,\n // We don't use Node.js mirror locally, but a user might\n NVM_NODEJS_ORG_MIRROR: process.env.NVM_NODEJS_ORG_MIRROR,\n EAS_BUILD: '1',\n EAS_BUILD_RUNNER: 'local-build-plugin',\n EAS_BUILD_PLATFORM: job.platform,\n EAS_BUILD_WORKINGDIR: path.join(workingdir, 'build'),\n EAS_BUILD_PROFILE: metadata.buildProfile,\n EAS_BUILD_GIT_COMMIT_HASH: metadata.gitCommitHash,\n EAS_BUILD_USERNAME: username,\n ...(job.platform === Platform.ANDROID && {\n EAS_BUILD_ANDROID_VERSION_CODE: job.version?.versionCode,\n EAS_BUILD_ANDROID_VERSION_NAME: job.version?.versionName,\n }),\n ...(job.platform === Platform.IOS && {\n EAS_BUILD_IOS_BUILD_NUMBER: job.version?.buildNumber,\n EAS_BUILD_IOS_APP_VERSION: job.version?.appVersion,\n }),\n };\n const env = pickBy(unfilteredEnv, (val?: string): val is string => !!val);\n\n let artifacts: Artifacts | undefined;\n switch (job.platform) {\n case Platform.ANDROID: {\n artifacts = await buildAndroidAsync(job, { env, workingdir, metadata, logger });\n break;\n }\n case Platform.IOS: {\n artifacts = await buildIosAsync(job, { env, workingdir, metadata, logger });\n break;\n }\n }\n if (!config.skipNativeBuild) {\n console.log();\n console.log(chalk.green('Build successful'));\n if (artifacts.APPLICATION_ARCHIVE) {\n console.log(\n chalk.green(`You can find the build artifacts in ${artifacts.APPLICATION_ARCHIVE}`)\n );\n }\n }\n } catch (e: any) {\n if (e instanceof SkipNativeBuildError) {\n console.log(e.message);\n return;\n }\n console.error();\n console.error(chalk.red(`Build failed`));\n if (logger.level() === DEBUG) {\n console.error(e.innerError);\n }\n throw e;\n } finally {\n if (!config.skipCleanup) {\n await fs.remove(workingdir);\n } else {\n console.error(chalk.yellow(`Skipping cleanup, ${workingdir} won't be removed.`));\n }\n if (job.projectArchive.type === ArchiveSourceType.PATH) {\n await fs.remove(job.projectArchive.path);\n }\n }\n}\n"]}
|
package/dist/checkRuntime.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkRuntime.js","sourceRoot":"","sources":["../src/checkRuntime.ts"],"names":[],"mappings":";;;;;AA4HA,8CAMC;AAlID,uDAAoD;AACpD,kDAA0B;AAC1B,oEAA2C;AAC3C,wDAA0B;AAO1B,SAAS,IAAI,CAAC,GAAW;IACvB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,KAAK,CAAC,GAAW;IACxB,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,GAAgB;IAC9B;QACE,KAAK,CAAC,UAAU,CAAC,GAAQ;YACvB,IAAI,GAAG,CAAC,QAAQ,KAAK,wBAAQ,CAAC,GAAG,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;gBACnE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;YAC1D,CAAC;iBAAM,IACL,GAAG,CAAC,QAAQ,KAAK,wBAAQ,CAAC,OAAO;gBACjC,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,EAC/C,CAAC;gBACD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CA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CAAC,GAAQ;;YACvB,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,CAAC,MAAM,IAAA,qBAAU,EAAC,KAAK,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBAC1F,MAAM,cAAc,GAAG,GAAG,CAAC,QAAQ,KAAK,wBAAQ,CAAC,GAAG,KAAI,MAAA,GAAG,CAAC,kBAAkB,0CAAE,SAAS,CAAA,CAAC;gBAC1F,IAAI,cAAc,IAAI,cAAc,KAAK,OAAO,EAAE,CAAC;oBACjD,IAAI,CACF,kGAAkG,CACnG,CAAC;gBACJ,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,KAAK,CAAC,uEAAuE,CAAC,CAAC;gBAC/E,MAAM,GAAG,CAAC;YACZ,CAAC;QACH,CAAC;KACF;CACF,CAAC;AAEK,KAAK,UAAU,iBAAiB,CAAC,GAAQ;IAC9C,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,SAAS,CAAC,QAAQ,KAAK,GAAG,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;YAC/D,MAAM,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;AACH,CAAC","sourcesContent":["import { Job, Platform } from '@expo/eas-build-job';\nimport chalk from 'chalk';\nimport spawnAsync from '@expo/spawn-async';\nimport fs from 'fs-extra';\n\ninterface Validator {\n platform?: Platform;\n checkAsync: (job: Job) => Promise<void>;\n}\n\nfunction warn(msg: string): void {\n console.log(chalk.yellow(msg));\n}\n\nfunction error(msg: string): void {\n console.error(chalk.red(msg));\n}\n\nconst validators: Validator[] = [\n {\n async checkAsync(job: Job) {\n if (job.platform === Platform.IOS && process.platform !== 'darwin') {\n throw new Error('iOS builds can only be run on macOS.');\n } else if (\n job.platform === Platform.ANDROID &&\n !['linux', 'darwin'].includes(process.platform)\n ) {\n throw new Error('Android builds are supported only on Linux and macOS');\n }\n },\n },\n {\n async checkAsync(job: Job) {\n try {\n const version = (await spawnAsync('node', ['--version'], { stdio: 'pipe' })).stdout.trim();\n const sanitizedVersion = version.startsWith('v') ? version.slice(1) : version;\n const versionFromJob = job.builderEnvironment?.node;\n if (versionFromJob) {\n const sanitizedVersionFromJob = versionFromJob.startsWith('v')\n ? versionFromJob.slice(1)\n : versionFromJob;\n if (sanitizedVersion !== sanitizedVersionFromJob) {\n warn(\n 'Node.js version in your eas.json does not match the Node.js currently installed in your system'\n );\n }\n }\n } catch (err) {\n error(\"Node.js is not available, make sure it's installed and in your PATH\");\n throw err;\n }\n },\n },\n {\n async checkAsync(job: Job) {\n const versionFromJob = job.builderEnvironment?.yarn;\n if (!versionFromJob) {\n return;\n }\n try {\n const version = (await spawnAsync('yarn', ['--version'], { stdio: 'pipe' })).stdout.trim();\n if (versionFromJob !== version) {\n warn(\n 'Yarn version in your eas.json does not match the yarn currently installed in your system'\n );\n }\n } catch {\n warn(\"Yarn is not available, make sure it's installed and in your PATH\");\n }\n },\n },\n {\n platform: Platform.ANDROID,\n async checkAsync(_) {\n if (!process.env.ANDROID_NDK_HOME) {\n warn(\n 'ANDROID_NDK_HOME environment variable was not specified, continuing build without NDK'\n );\n return;\n }\n if (!(await fs.pathExists(process.env.ANDROID_NDK_HOME))) {\n throw new Error(`NDK was not found under ${process.env.ANDROID_NDK_HOME}`);\n }\n },\n },\n {\n platform: Platform.IOS,\n async checkAsync() {\n try {\n await spawnAsync('fastlane', ['--version'], {\n stdio: 'pipe',\n env: {\n ...process.env,\n FASTLANE_DISABLE_COLORS: '1',\n FASTLANE_SKIP_UPDATE_CHECK: '1',\n SKIP_SLOW_FASTLANE_WARNING: 'true',\n FASTLANE_HIDE_TIMESTAMP: 'true',\n },\n });\n } catch (err) {\n error(\"Fastlane is not available, make sure it's installed and in your PATH\");\n throw err;\n }\n },\n },\n {\n platform: Platform.IOS,\n async checkAsync(job: Job) {\n try {\n const version = (await spawnAsync('pod', ['--version'], { stdio: 'pipe' })).stdout.trim();\n const versionFromJob = job.platform === Platform.IOS && job.builderEnvironment?.cocoapods;\n if (versionFromJob && versionFromJob !== version) {\n warn(\n 'Cocoapods version in your eas.json does not match the version currently installed in your system'\n );\n }\n } catch (err) {\n error(\"Cocoapods is not available, make sure it's installed and in your PATH\");\n throw err;\n }\n },\n },\n];\n\nexport async function checkRuntimeAsync(job: Job): Promise<void> {\n for (const validator of validators) {\n if (validator.platform === job.platform || !validator.platform) {\n await validator.checkAsync(job);\n }\n }\n}\n"]}
|
package/dist/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AAExB,+BAAoC;AACpC,0DAAiC;AACjC,yCAA2C;AAE3C,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,mBAAQ,EAAC,iBAAiB,CAAC,CAAC;AAE7C,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC;AAC7D,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC;AAChE,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC;AACzE,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC;AAClE,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC;AAElE,IACE,OAAO,CAAC,GAAG,CAAC,4BAA4B;IACxC,CAAC,MAAM,CAAC,MAAM,CAAC,oBAAW,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA2C,CAAC,EAC7F,CAAC;IACD,MAAM,IAAI,KAAK,CACb,0DAA0D,MAAM,CAAC,MAAM,CAAC,oBAAW,CAAC;SACjF,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC;SACtB,IAAI,CAAC,IAAI,CAAC,cAAc,CAC5B,CAAC;AACJ,CAAC;AACD,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,4BAA2C,CAAC;AAE/E,kBAAe;IACb,UAAU,EAAE,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,cAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,SAAM,GAAE,CAAC;IACtD,WAAW,EAAE,cAAc,KAAK,GAAG;IACnC,eAAe,EAAE,kBAAkB,KAAK,GAAG;IAC3C,YAAY,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,OAAO,CAAC,GAAG,EAAE;IAC9C,YAAY,EAAE,eAAe;IAC7B,MAAM,EAAE;QACN,kBAAkB,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,oBAAW,CAAC,IAAI;KACvD;CACF,CAAC","sourcesContent":["import path from 'path';\n\nimport { v4 as uuidv4 } from 'uuid';\nimport envPaths from 'env-paths';\nimport { LoggerLevel } from '@expo/logger';\n\nconst { temp } = envPaths('eas-build-local');\n\nconst envWorkingdir = process.env.EAS_LOCAL_BUILD_WORKINGDIR;\nconst envSkipCleanup = process.env.EAS_LOCAL_BUILD_SKIP_CLEANUP;\nconst envSkipNativeBuild = process.env.EAS_LOCAL_BUILD_SKIP_NATIVE_BUILD;\nconst envArtifactsDir = process.env.EAS_LOCAL_BUILD_ARTIFACTS_DIR;\nconst envArtifactPath = process.env.EAS_LOCAL_BUILD_ARTIFACT_PATH;\n\nif (\n process.env.EAS_LOCAL_BUILD_LOGGER_LEVEL &&\n !Object.values(LoggerLevel).includes(process.env.EAS_LOCAL_BUILD_LOGGER_LEVEL as LoggerLevel)\n) {\n throw new Error(\n `Invalid value for EAS_LOCAL_BUILD_LOGGER_LEVEL, one of ${Object.values(LoggerLevel)\n .map((ll) => `\"${ll}\"`)\n .join(', ')} is expected`\n );\n}\nconst envLoggerLevel = process.env.EAS_LOCAL_BUILD_LOGGER_LEVEL as LoggerLevel;\n\nexport default {\n workingdir: envWorkingdir ?? path.join(temp, uuidv4()),\n skipCleanup: envSkipCleanup === '1',\n skipNativeBuild: envSkipNativeBuild === '1',\n artifactsDir: envArtifactsDir ?? process.cwd(),\n artifactPath: envArtifactPath,\n logger: {\n defaultLoggerLevel: envLoggerLevel ?? LoggerLevel.INFO,\n },\n};\n"]}
|
package/dist/exit.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exit.js","sourceRoot":"","sources":["../src/exit.ts"],"names":[],"mappings":";;AAKA,kDAyBC;AAED,0CAEC;AAED,gCAEC;AAtCD,qCAAwC;AAExC,MAAM,QAAQ,GAAmC,EAAE,CAAC;AACpD,IAAI,gBAAgB,GAAG,KAAK,CAAC;AAE7B,SAAgB,mBAAmB;IACjC,IAAI,iBAAiB,GAAG,KAAK,CAAC;IAC9B,MAAM,UAAU,GAAG,KAAK,IAAmB,EAAE;QAC3C,IAAI,CAAC;YACH,8DAA8D;YAC9D,6BAA6B;YAC7B,IAAI,iBAAiB,EAAE,CAAC;gBACtB,OAAO;YACT,CAAC;YACD,iBAAiB,GAAG,IAAI,CAAC;YACzB,IAAA,qBAAY,GAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,8BAA8B,CAAC,CAAC;YACzE,gBAAgB,GAAG,IAAI,CAAC;YACxB,MAAM,OAAO,CAAC,UAAU,CACtB,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBACvB,OAAO,OAAO,EAAE,CAAC;YACnB,CAAC,CAAC,CACH,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,iBAAiB,GAAG,KAAK,CAAC;QAC5B,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AACnC,CAAC;AAED,SAAgB,eAAe,CAAC,EAA8B;IAC5D,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpB,CAAC;AAED,SAAgB,UAAU;IACxB,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import { createLogger } from './logger';\n\nconst handlers: (() => void | Promise<void>)[] = [];\nlet shouldExitStatus = false;\n\nexport function listenForInterrupts(): void {\n let handlerInProgress = false;\n const handleExit = async (): Promise<void> => {\n try {\n // when eas-cli calls childProcess.kill() local build receives\n // signal twice in some cases\n if (handlerInProgress) {\n return;\n }\n handlerInProgress = true;\n createLogger().error({ phase: 'ABORT' }, 'Received termination signal.');\n shouldExitStatus = true;\n await Promise.allSettled(\n handlers.map((handler) => {\n return handler();\n })\n );\n } finally {\n handlerInProgress = false;\n }\n process.exit(1);\n };\n\n process.on('SIGTERM', handleExit);\n process.on('SIGINT', handleExit);\n}\n\nexport function registerHandler(fn: () => void | Promise<void>): void {\n handlers.push(fn);\n}\n\nexport function shouldExit(): boolean {\n return shouldExitStatus;\n}\n"]}
|
package/dist/ios.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ios.js","sourceRoot":"","sources":["../src/ios.ts"],"names":[],"mappings":";;;;;AASA,sCAkCC;AA3CD,uDAAgF;AAChF,mDAAsE;AACtE,uDAA+B;AAE/B,qCAAqC;AAErC,2CAA+C;AAC/C,sDAA8B;AAEvB,KAAK,UAAU,aAAa,CACjC,GAAY,EACZ,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAe;;IAE3D,MAAM,WAAW,GAAG,MAAA,GAAG,CAAC,OAAO,0CAAE,WAAW,CAAC;IAC7C,MAAM,UAAU,GAAG,MAAA,GAAG,CAAC,OAAO,0CAAE,UAAU,CAAC;IAC3C,MAAM,GAAG,GAAQ;QACf,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ext, Artifacts } from '@expo/build-tools';\nimport omit from 'lodash/omit';\n\nimport { logBuffer } from './logger';\nimport { BuildParams } from './types';\nimport { prepareArtifacts } from './artifacts';\nimport config from './config';\n\nexport async function buildIosAsync(\n job: Ios.Job,\n { workingdir, env: baseEnv, metadata, logger }: BuildParams\n): Promise<Artifacts> {\n const buildNumber = job.version?.buildNumber;\n const appVersion = job.version?.appVersion;\n const env: Env = {\n ...baseEnv,\n ...(buildNumber && { EAS_BUILD_IOS_BUILD_NUMBER: buildNumber }),\n ...(appVersion && { EAS_BUILD_IOS_APP_VERSION: appVersion }),\n };\n const ctx = new BuildContext<Ios.Job>(job, {\n workingdir,\n logger,\n logBuffer,\n uploadArtifact: async ({ artifact, logger }) => {\n if (artifact.type === ManagedArtifactType.APPLICATION_ARCHIVE) {\n return await prepareArtifacts(artifact.paths, logger);\n } else if (artifact.type === ManagedArtifactType.BUILD_ARTIFACTS) {\n return await prepareArtifacts(artifact.paths, logger);\n } else {\n return { filename: null };\n }\n },\n env,\n metadata,\n skipNativeBuild: config.skipNativeBuild,\n });\n\n await ctx.runBuildPhase(BuildPhase.START_BUILD, async () => {\n ctx.logger.info({ job: omit(ctx.job, 'secrets') }, 'Starting build');\n });\n\n return await Builders.iosBuilder(ctx);\n}\n"]}
|
package/dist/logger.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";;;;;;AAqIA,oCAeC;AApJD,mCAAkC;AAElC,oDAA4B;AAC5B,kDAA0B;AAC1B,uDAA+B;AAE/B,yCAA2C;AAE3C,sDAA8B;AAW9B,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAOhC,MAAM,iBAAkB,SAAQ,iBAAQ;IAItC,YAA6B,aAAqB;QAChD,KAAK,EAAE,CAAC;QADmB,kBAAa,GAAb,aAAa,CAAQ;QAH3C,aAAQ,GAAG,IAAI,CAAC;QAChB,WAAM,GAAgB,EAAE,C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B,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC;IAChB,CAAC;CACF;AAEY,QAAA,SAAS,GAAG,IAAI,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;AAEpE,SAAgB,YAAY,CAAC,KAAmB;IAC9C,OAAO,gBAAM,CAAC,YAAY,CAAC;QACzB,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,gBAAM,CAAC,cAAc;QAClC,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,gBAAM,CAAC,MAAM,CAAC,kBAAkB;gBAChD,MAAM,EAAE,IAAI,YAAY,EAAE;aAC3B;YACD;gBACE,KAAK,EAAE,oBAAW,CAAC,IAAI;gBACvB,MAAM,EAAE,iBAAS;aAClB;SACF;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { Writable } from 'stream';\n\nimport bunyan from 'bunyan';\nimport chalk from 'chalk';\nimport omit from 'lodash/omit';\nimport { LogBuffer } from '@expo/build-tools';\nimport { LoggerLevel } from '@expo/logger';\n\nimport config from './config';\n\ninterface Log {\n msg: string;\n level: number;\n err?: any;\n marker?: string;\n phase: string;\n source: 'stdout' | 'stderr';\n buildStepDisplayName?: string;\n}\nconst MAX_LINES_IN_BUFFER = 100;\n\ninterface CachedLog {\n msg: string;\n phase: string;\n}\n\nclass BuildCliLogBuffer extends Writable implements LogBuffer {\n public writable = true;\n public buffer: CachedLog[] = [];\n\n constructor(private readonly numberOfLines: number) {\n super();\n }\n\n public write(rec: any): boolean {\n if (\n // verify required fields\n typeof rec !== 'object' ||\n typeof rec?.msg !== 'string' ||\n typeof rec?.phase !== 'string' ||\n // use only logs from spawn commands\n (rec?.source !== 'stdout' && rec?.source !== 'stderr') ||\n // skip all short lines (it could potentially be some loader)\n (rec?.msg ?? '').length < 3\n ) {\n return true;\n }\n if (this.buffer.length >= this.numberOfLines) {\n this.buffer.shift();\n }\n this.buffer.push({ msg: rec.msg, phase: rec.phase });\n return true;\n }\n\n public getLogs(): string[] {\n return this.buffer.map(({ msg }) => msg);\n }\n\n public getPhaseLogs(buildPhase: string): string[] {\n return this.buffer.filter(({ phase }) => phase === buildPhase).map(({ msg }) => msg);\n }\n}\n\nclass PrettyStream extends Writable {\n write(rawLog: string): boolean {\n const log = JSON.parse(rawLog) as Log;\n if (log.marker) {\n return true;\n }\n const msg = this.formatMessage(log);\n if (log.level >= bunyan.ERROR || log.source === 'stderr') {\n console.error(msg);\n } else {\n console.log(msg);\n }\n\n const extraProperties = omit(log, [\n 'msg',\n 'err',\n 'level',\n 'phase',\n 'marker',\n 'source',\n 'time',\n 'id',\n 'v',\n 'pid',\n 'hostname',\n 'name',\n 'buildStepInternalId',\n 'buildStepId',\n 'buildStepDisplayName',\n ]);\n if (Object.keys(extraProperties).length !== 0) {\n const str = JSON.stringify(extraProperties, null, 2);\n // substring removes `{\\n` and `\\n}`\n console.log(chalk.gray(str.substring(2, str.length - 2)));\n }\n if (log?.err?.stack) {\n console.error(chalk.red(log.err.stack));\n }\n return true;\n }\n\n private formatMessage(log: Log): string {\n const phase = this.getPhaseName(log);\n switch (log.level) {\n case bunyan.DEBUG:\n return `[${phase}] ${chalk.gray(log.msg)}`;\n case bunyan.INFO: {\n const msg = log.source === 'stderr' ? chalk.red(log.msg) : log.msg;\n return `[${phase}] ${msg}`;\n }\n case bunyan.WARN:\n return `[${phase}] ${chalk.yellow(log.msg)}`;\n case bunyan.ERROR:\n return `[${phase}] ${chalk.red(log.msg)}`;\n case bunyan.FATAL:\n return `[${phase}] ${chalk.red(log.msg)}`;\n default:\n return log.msg;\n }\n }\n\n private getPhaseName(log: Log): string {\n return log.phase === 'CUSTOM' && log.buildStepDisplayName\n ? log.buildStepDisplayName\n : log.phase;\n }\n}\n\nexport const logBuffer = new BuildCliLogBuffer(MAX_LINES_IN_BUFFER);\n\nexport function createLogger(level?: LoggerLevel): bunyan {\n return bunyan.createLogger({\n name: 'eas-build-cli',\n serializers: bunyan.stdSerializers,\n streams: [\n {\n level: level ?? config.logger.defaultLoggerLevel,\n stream: new PrettyStream(),\n },\n {\n level: LoggerLevel.INFO,\n stream: logBuffer,\n },\n ],\n });\n}\n"]}
|
package/dist/main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAE1B,6CAA+C;AAC/C,mCAAqC;AACrC,iCAAyD;AACzD,iDAAmD;AAEnD,IAAA,0BAAmB,GAAE,CAAC;AAEtB,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAA,4BAAe,GAAE,CAAC;QAClD,MAAM,IAAA,gCAAiB,EAAC,GAAG,CAAC,CAAC;QAC7B,MAAM,IAAA,kBAAU,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,IAAI,CAAC,IAAA,iBAAU,GAAE,EAAE,CAAC;YAClB,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;AACH,CAAC;AAED,KAAK,IAAI,EAAE,CAAC","sourcesContent":["import chalk from 'chalk';\n\nimport { parseInputAsync } from './parseInput';\nimport { buildAsync } from './build';\nimport { listenForInterrupts, shouldExit } from './exit';\nimport { checkRuntimeAsync } from './checkRuntime';\n\nlistenForInterrupts();\n\nasync function main(): Promise<void> {\n try {\n const { job, metadata } = await parseInputAsync();\n await checkRuntimeAsync(job);\n await buildAsync(job, metadata);\n } catch (err: any) {\n if (!shouldExit()) {\n console.error(chalk.red(err.message));\n console.log(err.stack);\n process.exit(1);\n }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I,CAAC,kDAAkD,CACxF,CACF,CAAC;QACF,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,WAAW;IAClB,OAAO,CAAC,GAAG,CACT,+EAA+E,eAAK,CAAC,IAAI,CACvF,SAAS,CACV,4BAA4B,eAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CACtD,CAAC;AACJ,CAAC","sourcesContent":["import {\n sanitizeBuildJob,\n ArchiveSourceType,\n Metadata,\n sanitizeMetadata,\n BuildJob,\n} from '@expo/eas-build-job';\nimport Joi from 'joi';\nimport chalk from 'chalk';\nimport fs from 'fs-extra';\n\nimport { registerHandler } from './exit';\n\nconst packageJson = require('../package.json');\n\ninterface Params {\n job: BuildJob;\n metadata: Metadata;\n}\n\nconst ParamsSchema = Joi.object<Params>({\n job: Joi.object().unknown(),\n metadata: Joi.object().unknown(),\n});\n\nexport async function parseInputAsync(): Promise<Params> {\n if (process.argv.findIndex((arg) => arg === '--version' || arg === '-v') !== -1) {\n console.log(packageJson.version);\n process.exit(0);\n }\n const rawInput = process.argv[2];\n\n if (!rawInput) {\n displayHelp();\n process.exit(1);\n }\n let parsedParams;\n try {\n parsedParams = JSON.parse(Buffer.from(rawInput, 'base64').toString('utf8'));\n } catch (err) {\n console.error(`${chalk.red('The input passed as a argument is not base64 encoded json.')}`);\n throw err;\n }\n const params = validateParams(parsedParams);\n registerHandler(async () => {\n if (params.job.projectArchive.type === ArchiveSourceType.PATH) {\n await fs.remove(params.job.projectArchive.path);\n }\n });\n return params;\n}\n\nfunction validateParams(params: object): Params {\n const { value, error } = ParamsSchema.validate(params, {\n stripUnknown: true,\n convert: true,\n abortEarly: false,\n });\n if (error) {\n throw error;\n }\n try {\n const job = sanitizeBuildJob(value.job);\n const metadata = sanitizeMetadata(value.metadata);\n return { ...value, job, metadata };\n } catch (err) {\n console.log(`Currently using ${packageJson.name}@${packageJson.version}.`);\n console.error(\n chalk.red(\n `Job object has incorrect format, update to latest versions of ${chalk.bold(\n 'eas-cli'\n )} and ${chalk.bold(packageJson.name)} to make sure you are using compatible packages.`\n )\n );\n throw err;\n }\n}\n\nfunction displayHelp(): void {\n console.log(\n `This tool is not intended for standalone use, it will be used internally by ${chalk.bold(\n 'eas-cli'\n )} when building with flag ${chalk.bold('--local')}.`\n );\n}\n"]}
|
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { Metadata } from '@expo/eas-build-job';\nimport { bunyan } from '@expo/logger';\n\nexport interface BuildParams {\n workingdir: string;\n env: Record<string, string>;\n metadata: Metadata;\n logger: bunyan;\n}\n"]}
|
package/dist/workingdir.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workingdir.js","sourceRoot":"","sources":["../src/workingdir.ts"],"names":[],"mappings":";;;;;AASA,wDAuBC;AAhCD,gDAAwB;AAExB,kDAA0B;AAC1B,wDAA0B;AAG1B,sDAA8B;AAC9B,iCAAyC;AAElC,KAAK,UAAU,sBAAsB,CAAC,EAAE,MAAM,EAAsB;IACzE,MAAM,EAAE,UAAU,EAAE,GAAG,gBAAM,CAAC;IAC9B,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,wBAAwB,UAAU,EAAE,CAAC,CAAC;IAEjF,IAAI,CAAC,MAAM,kBAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,kBAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnF,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IACD,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;IACpD,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;IAChD,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAC;IACjE,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC;IACvD,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;IAC9C,MAAM,kBAAE,CAAC,MAAM,CAAC,cAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;IAC9C,IAAA,sBAAe,EAAC,KAAK,IAAI,EAAE;QACzB,IAAI,CAAC,gBAAM,CAAC,WAAW,EAAE,CAAC;YACxB,MAAM,kBAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CACX,eAAK,CAAC,MAAM,CAAC,oEAAoE,CAAC,CACnF,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import path from 'path';\n\nimport chalk from 'chalk';\nimport fs from 'fs-extra';\nimport { bunyan } from '@expo/logger';\n\nimport config from './config';\nimport { registerHandler } from './exit';\n\nexport async function prepareWorkingdirAsync({ logger }: { logger: bunyan }): Promise<string> {\n const { workingdir } = config;\n logger.info({ phase: 'SETUP_WORKINGDIR' }, `Preparing workingdir ${workingdir}`);\n\n if ((await fs.pathExists(workingdir)) && (await fs.readdir(workingdir)).length > 0) {\n throw new Error('Workingdir is not empty.');\n }\n await fs.mkdirp(path.join(workingdir, 'artifacts'));\n await fs.mkdirp(path.join(workingdir, 'build'));\n await fs.mkdirp(path.join(workingdir, 'temporary-custom-build'));\n await fs.mkdirp(path.join(workingdir, 'custom-build'));\n await fs.mkdirp(path.join(workingdir, 'env'));\n await fs.mkdirp(path.join(workingdir, 'bin'));\n registerHandler(async () => {\n if (!config.skipCleanup) {\n await fs.remove(workingdir);\n } else {\n console.error(\n chalk.yellow(\"EAS_LOCAL_BUILD_SKIP_CLEANUP is set, working dir won't be removed.\")\n );\n }\n });\n return workingdir;\n}\n"]}
|