@expo/eas-json 7.0.0 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/schema.js +1 -1
- package/build/submit/resolver.js +1 -1
- package/build/submit/schema.d.ts +3 -2
- package/build/submit/schema.js +31 -4
- package/build/utils.js +13 -1
- package/package.json +2 -2
package/build/schema.js
CHANGED
|
@@ -14,5 +14,5 @@ exports.EasJsonSchema = joi_1.default.object({
|
|
|
14
14
|
promptToConfigurePushNotifications: joi_1.default.boolean(),
|
|
15
15
|
}),
|
|
16
16
|
build: joi_1.default.object().pattern(joi_1.default.string(), schema_1.BuildProfileSchema),
|
|
17
|
-
submit: joi_1.default.object().pattern(joi_1.default.string(), schema_2.
|
|
17
|
+
submit: joi_1.default.object().pattern(joi_1.default.string(), schema_2.UnresolvedSubmitProfileSchema),
|
|
18
18
|
});
|
package/build/submit/resolver.js
CHANGED
|
@@ -63,7 +63,7 @@ function mergeProfiles(base, update) {
|
|
|
63
63
|
return { ...base, ...update };
|
|
64
64
|
}
|
|
65
65
|
function getDefaultProfile(platform) {
|
|
66
|
-
const Schema = platform === eas_build_job_1.Platform.ANDROID ? schema_1.AndroidSubmitProfileSchema : schema_1.
|
|
66
|
+
const Schema = platform === eas_build_job_1.Platform.ANDROID ? schema_1.AndroidSubmitProfileSchema : schema_1.ResolvedIosSubmitProfileSchema;
|
|
67
67
|
return Schema.validate({}, { allowUnknown: false, abortEarly: false, convert: true }).value;
|
|
68
68
|
}
|
|
69
69
|
exports.getDefaultProfile = getDefaultProfile;
|
package/build/submit/schema.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Joi from 'joi';
|
|
2
2
|
export declare const AndroidSubmitProfileSchema: Joi.ObjectSchema<any>;
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const UnresolvedIosSubmitProfileSchema: Joi.ObjectSchema<any>;
|
|
4
|
+
export declare const ResolvedIosSubmitProfileSchema: Joi.ObjectSchema<any>;
|
|
5
|
+
export declare const UnresolvedSubmitProfileSchema: Joi.ObjectSchema<any>;
|
package/build/submit/schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UnresolvedSubmitProfileSchema = exports.ResolvedIosSubmitProfileSchema = exports.UnresolvedIosSubmitProfileSchema = exports.AndroidSubmitProfileSchema = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const joi_1 = tslib_1.__importDefault(require("joi"));
|
|
6
6
|
const types_1 = require("./types");
|
|
@@ -20,7 +20,9 @@ exports.AndroidSubmitProfileSchema = joi_1.default.object({
|
|
|
20
20
|
otherwise: joi_1.default.forbidden(),
|
|
21
21
|
}),
|
|
22
22
|
});
|
|
23
|
-
|
|
23
|
+
// it is less strict submission schema allowing for magic syntax like "$ASC_API_KEY_PATH"
|
|
24
|
+
// to read value from environment variable later on
|
|
25
|
+
exports.UnresolvedIosSubmitProfileSchema = joi_1.default.object({
|
|
24
26
|
ascApiKeyPath: joi_1.default.string(),
|
|
25
27
|
ascApiKeyId: joi_1.default.string(),
|
|
26
28
|
ascApiKeyIssuerId: joi_1.default.string(),
|
|
@@ -34,8 +36,33 @@ exports.IosSubmitProfileSchema = joi_1.default.object({
|
|
|
34
36
|
bundleIdentifier: joi_1.default.string(),
|
|
35
37
|
metadataPath: joi_1.default.string(),
|
|
36
38
|
});
|
|
37
|
-
|
|
39
|
+
// more strict version after resolving all of the values
|
|
40
|
+
exports.ResolvedIosSubmitProfileSchema = joi_1.default.object({
|
|
41
|
+
ascApiKeyPath: joi_1.default.string(),
|
|
42
|
+
ascApiKeyId: joi_1.default.string()
|
|
43
|
+
.regex(/^[\dA-Z]{10}$/)
|
|
44
|
+
.message('Invalid Apple App Store Connect API Key ID ("ascApiKeyId") was specified. It should consist of 10 uppercase letters or digits. Example: "AB32CDE81F". Learn more: https://expo.fyi/creating-asc-api-key.'),
|
|
45
|
+
ascApiKeyIssuerId: joi_1.default.string()
|
|
46
|
+
.uuid()
|
|
47
|
+
.message('Invalid Apple App Store Connect API Key Issuer ID ("ascApiKeyIssuerId") was specified. It should be a valid UUID. Example: "b4d78f58-48c6-4f2c-96cb-94d8cd76970a". Learn more: https://expo.fyi/creating-asc-api-key.'),
|
|
48
|
+
appleId: joi_1.default.string()
|
|
49
|
+
.email()
|
|
50
|
+
.message('Invalid Apple ID was specified. It should be a valid email address. Example: "name@example.com".'),
|
|
51
|
+
ascAppId: joi_1.default.string()
|
|
52
|
+
.regex(/^\d{10}$/)
|
|
53
|
+
.message('Invalid Apple App Store Connect App ID ("ascAppId") was specified. It should consist of 10 digits. Example: "1234567891". Learn more: https://expo.fyi/asc-app-id.md.'),
|
|
54
|
+
appleTeamId: joi_1.default.string()
|
|
55
|
+
.regex(/^[\dA-Z]{10}$/)
|
|
56
|
+
.message('Invalid Apple Team ID was specified. It should consist of 10 uppercase letters or digits. Example: "AB32CDE81F".'),
|
|
57
|
+
sku: joi_1.default.string(),
|
|
58
|
+
language: joi_1.default.string().default('en-US'),
|
|
59
|
+
companyName: joi_1.default.string(),
|
|
60
|
+
appName: joi_1.default.string(),
|
|
61
|
+
bundleIdentifier: joi_1.default.string(),
|
|
62
|
+
metadataPath: joi_1.default.string(),
|
|
63
|
+
});
|
|
64
|
+
exports.UnresolvedSubmitProfileSchema = joi_1.default.object({
|
|
38
65
|
extends: joi_1.default.string(),
|
|
39
66
|
android: exports.AndroidSubmitProfileSchema,
|
|
40
|
-
ios: exports.
|
|
67
|
+
ios: exports.UnresolvedIosSubmitProfileSchema,
|
|
41
68
|
});
|
package/build/utils.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EasJsonUtils = void 0;
|
|
4
|
+
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
4
5
|
const resolver_1 = require("./build/resolver");
|
|
5
6
|
const errors_1 = require("./errors");
|
|
6
7
|
const resolver_2 = require("./submit/resolver");
|
|
8
|
+
const schema_1 = require("./submit/schema");
|
|
7
9
|
class EasJsonUtils {
|
|
8
10
|
static async getBuildProfileNamesAsync(accessor) {
|
|
9
11
|
var _a;
|
|
@@ -66,7 +68,17 @@ class EasJsonUtils {
|
|
|
66
68
|
}
|
|
67
69
|
static async getSubmitProfileAsync(accessor, platform, profileName) {
|
|
68
70
|
const easJson = await accessor.readAsync();
|
|
69
|
-
|
|
71
|
+
const profile = (0, resolver_2.resolveSubmitProfile)({ easJson, platform, profileName });
|
|
72
|
+
const Schema = platform === eas_build_job_1.Platform.ANDROID ? schema_1.AndroidSubmitProfileSchema : schema_1.ResolvedIosSubmitProfileSchema;
|
|
73
|
+
const { value, error } = Schema.validate(profile, {
|
|
74
|
+
allowUnknown: false,
|
|
75
|
+
abortEarly: false,
|
|
76
|
+
convert: true,
|
|
77
|
+
});
|
|
78
|
+
if (error) {
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
return value;
|
|
70
82
|
}
|
|
71
83
|
}
|
|
72
84
|
exports.EasJsonUtils = EasJsonUtils;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/eas-json",
|
|
3
3
|
"description": "A library for interacting with eas.json",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.1.0",
|
|
5
5
|
"author": "Expo <support@expo.dev>",
|
|
6
6
|
"bugs": "https://github.com/expo/eas-cli/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"node": "20.11.0",
|
|
54
54
|
"yarn": "1.22.21"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "bbf14e2ee8554929cea6262d60bce6395e4d9536"
|
|
57
57
|
}
|