eas-cli 2.5.1 → 2.7.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/README.md +8 -1095
- package/build/branch/queries.d.ts +8 -1
- package/build/branch/queries.js +53 -23
- package/build/build/android/build.js +1 -0
- package/build/build/ios/build.js +1 -0
- package/build/build/local.js +1 -1
- package/build/build/queries.d.ts +11 -1
- package/build/build/queries.js +39 -1
- package/build/build/validate.d.ts +1 -0
- package/build/build/validate.js +121 -1
- package/build/channel/queries.d.ts +11 -0
- package/build/channel/queries.js +51 -9
- package/build/channel/utils.js +22 -22
- package/build/commandUtils/context/LoggedInContextField.d.ts +3 -0
- package/build/commandUtils/context/LoggedInContextField.js +9 -1
- package/build/commandUtils/context/MaybeLoggedInContextField.d.ts +3 -0
- package/build/commandUtils/context/MaybeLoggedInContextField.js +9 -1
- package/build/commandUtils/context/contextUtils/createGraphqlClient.d.ts +2 -2
- package/build/commandUtils/context/contextUtils/getProjectIdAsync.js +1 -1
- package/build/commandUtils/gating/FeatureGateEnvOverrides.d.ts +7 -0
- package/build/commandUtils/gating/FeatureGateEnvOverrides.js +35 -0
- package/build/commandUtils/gating/FeatureGateKey.d.ts +4 -0
- package/build/commandUtils/gating/FeatureGateKey.js +11 -0
- package/build/commandUtils/gating/FeatureGateTestOverrides.d.ts +5 -0
- package/build/commandUtils/gating/FeatureGateTestOverrides.js +17 -0
- package/build/commandUtils/gating/FeatureGating.d.ts +16 -0
- package/build/commandUtils/gating/FeatureGating.js +55 -0
- package/build/commandUtils/pagination.d.ts +4 -3
- package/build/commands/branch/create.d.ts +0 -3
- package/build/commands/branch/create.js +2 -27
- package/build/commands/branch/list.d.ts +1 -1
- package/build/commands/branch/view.d.ts +1 -1
- package/build/commands/build/configure.d.ts +1 -1
- package/build/commands/build/index.d.ts +2 -2
- package/build/commands/build/list.d.ts +4 -4
- package/build/commands/build/list.js +2 -15
- package/build/commands/build/run.d.ts +21 -0
- package/build/commands/build/run.js +149 -0
- package/build/commands/build/version/set.d.ts +1 -1
- package/build/commands/build/version/sync.d.ts +1 -1
- package/build/commands/channel/create.d.ts +0 -7
- package/build/commands/channel/create.js +4 -31
- package/build/commands/channel/list.d.ts +1 -1
- package/build/commands/channel/view.d.ts +1 -1
- package/build/commands/config.d.ts +1 -1
- package/build/commands/credentials.d.ts +1 -1
- package/build/commands/device/list.d.ts +1 -1
- package/build/commands/metadata/lint.d.ts +12 -0
- package/build/commands/metadata/lint.js +72 -0
- package/build/commands/metadata/pull.js +20 -9
- package/build/commands/metadata/push.js +20 -9
- package/build/commands/secret/create.d.ts +1 -1
- package/build/commands/secret/list.js +12 -17
- package/build/commands/submit.d.ts +1 -1
- package/build/commands/update/configure.d.ts +1 -0
- package/build/commands/update/configure.js +10 -216
- package/build/commands/update/index.d.ts +3 -9
- package/build/commands/update/index.js +136 -143
- package/build/commands/update/list.d.ts +1 -1
- package/build/commands/webhook/create.d.ts +1 -1
- package/build/commands/webhook/list.d.ts +1 -1
- package/build/commands/webhook/update.d.ts +1 -1
- package/build/devices/actions/create/inputMethod.js +2 -15
- package/build/devices/utils/formatDevice.d.ts +2 -0
- package/build/devices/utils/formatDevice.js +32 -7
- package/build/env.d.ts +8 -0
- package/build/env.js +8 -0
- package/build/graphql/generated.d.ts +100 -23
- package/build/graphql/generated.js +10 -2
- package/build/graphql/mutations/KeystoreGenerationUrlMutation.js +1 -1
- package/build/graphql/queries/UserQuery.js +2 -2
- package/build/graphql/types/Build.js +2 -0
- package/build/log.d.ts +1 -0
- package/build/log.js +3 -0
- package/build/metadata/apple/rules/index.d.ts +1 -0
- package/build/metadata/apple/rules/index.js +6 -0
- package/build/metadata/apple/rules/infoKeywordLength.d.ts +6 -0
- package/build/metadata/apple/rules/infoKeywordLength.js +35 -0
- package/build/metadata/apple/rules/infoRestrictedWords.d.ts +6 -0
- package/build/metadata/apple/rules/infoRestrictedWords.js +57 -0
- package/build/metadata/apple/tasks/index.d.ts +1 -2
- package/build/metadata/apple/tasks/index.js +1 -1
- package/build/metadata/auth.d.ts +21 -0
- package/build/metadata/auth.js +33 -0
- package/build/metadata/config/issue.d.ts +21 -0
- package/build/metadata/config/issue.js +9 -0
- package/build/metadata/config/resolve.d.ts +27 -0
- package/build/metadata/{config.js → config/resolve.js} +24 -25
- package/build/metadata/config/schema.d.ts +7 -0
- package/build/metadata/config/schema.js +2 -0
- package/build/metadata/config/validate.d.ts +3 -0
- package/build/metadata/config/validate.js +47 -0
- package/build/metadata/download.d.ts +11 -2
- package/build/metadata/download.js +14 -9
- package/build/metadata/errors.d.ts +3 -3
- package/build/metadata/errors.js +3 -1
- package/build/metadata/upload.d.ts +11 -2
- package/build/metadata/upload.js +16 -11
- package/build/metadata/utils/ajv.d.ts +10 -0
- package/build/metadata/utils/ajv.js +30 -0
- package/build/metadata/utils/telemetry.js +6 -6
- package/build/project/projectUtils.d.ts +3 -1
- package/build/project/projectUtils.js +10 -3
- package/build/project/publish.d.ts +13 -10
- package/build/project/publish.js +68 -38
- package/build/project/workflow.d.ts +1 -0
- package/build/project/workflow.js +9 -1
- package/build/run/android/run.d.ts +1 -0
- package/build/run/android/run.js +9 -0
- package/build/run/ios/run.d.ts +1 -0
- package/build/run/ios/run.js +31 -0
- package/build/run/ios/simctl.d.ts +2 -0
- package/build/run/ios/simctl.js +8 -0
- package/build/run/ios/simulator.d.ts +21 -0
- package/build/run/ios/simulator.js +161 -0
- package/build/run/ios/systemRequirements.d.ts +1 -0
- package/build/run/ios/systemRequirements.js +82 -0
- package/build/run/ios/xcode.d.ts +4 -0
- package/build/run/ios/xcode.js +41 -0
- package/build/run/ios/xcrun.d.ts +4 -0
- package/build/run/ios/xcrun.js +68 -0
- package/build/run/run.d.ts +8 -0
- package/build/run/run.js +15 -0
- package/build/submit/ArchiveSource.js +12 -16
- package/build/submit/utils/summary.d.ts +1 -1
- package/build/update/configure.d.ts +22 -0
- package/build/update/configure.js +200 -0
- package/build/update/queries.js +30 -39
- package/build/update/utils.d.ts +8 -1
- package/build/update/utils.js +35 -1
- package/build/utils/buildDistribution.d.ts +3 -0
- package/build/utils/buildDistribution.js +20 -0
- package/build/utils/download.d.ts +2 -0
- package/build/utils/download.js +114 -0
- package/build/utils/expoCli.d.ts +6 -0
- package/build/utils/expoCli.js +46 -1
- package/build/utils/expodash/filter.d.ts +2 -0
- package/build/utils/expodash/filter.js +8 -0
- package/build/utils/expodash/memoize.d.ts +2 -0
- package/build/utils/expodash/memoize.js +17 -0
- package/build/utils/formatFields.d.ts +3 -2
- package/build/utils/image.d.ts +6 -0
- package/build/utils/image.js +107 -0
- package/build/utils/statuspageService.js +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +36 -30
- package/schema/metadata-0.json +1 -1
- package/build/metadata/config.d.ts +0 -41
- package/build/metadata/context.d.ts +0 -50
- package/build/metadata/context.js +0 -47
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eas-cli",
|
|
3
3
|
"description": "EAS command line tool",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.0",
|
|
5
5
|
"author": "Expo <support@expo.dev>",
|
|
6
6
|
"bin": {
|
|
7
7
|
"eas": "./bin/run"
|
|
@@ -9,51 +9,53 @@
|
|
|
9
9
|
"bugs": "https://github.com/expo/eas-cli/issues",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@expo/apple-utils": "0.0.0-alpha.34",
|
|
12
|
-
"@expo/code-signing-certificates": "0.0.
|
|
12
|
+
"@expo/code-signing-certificates": "0.0.3",
|
|
13
13
|
"@expo/config": "7.0.1",
|
|
14
14
|
"@expo/config-plugins": "5.0.1",
|
|
15
15
|
"@expo/config-types": "46.0.2",
|
|
16
|
-
"@expo/eas-build-job": "0.2.
|
|
17
|
-
"@expo/eas-json": "2.
|
|
16
|
+
"@expo/eas-build-job": "0.2.96",
|
|
17
|
+
"@expo/eas-json": "2.7.0",
|
|
18
18
|
"@expo/json-file": "8.2.36",
|
|
19
19
|
"@expo/multipart-body-parser": "1.1.0",
|
|
20
|
+
"@expo/osascript": "2.0.33",
|
|
20
21
|
"@expo/package-manager": "0.0.56",
|
|
21
22
|
"@expo/pkcs12": "0.0.8",
|
|
22
23
|
"@expo/plist": "0.0.18",
|
|
23
|
-
"@expo/plugin-
|
|
24
|
-
"@expo/plugin-
|
|
25
|
-
"@expo/plugin-warn-if-update-available": "2.3.0",
|
|
24
|
+
"@expo/plugin-help": "5.1.16",
|
|
25
|
+
"@expo/plugin-warn-if-update-available": "2.4.0",
|
|
26
26
|
"@expo/prebuild-config": "5.0.3",
|
|
27
27
|
"@expo/results": "1.0.0",
|
|
28
28
|
"@expo/rudder-sdk-node": "1.1.1",
|
|
29
29
|
"@expo/spawn-async": "1.7.0",
|
|
30
30
|
"@expo/timeago.js": "1.0.0",
|
|
31
|
-
"@oclif/core": "1.
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"
|
|
31
|
+
"@oclif/core": "1.19.2",
|
|
32
|
+
"@oclif/plugin-autocomplete": "1.3.4",
|
|
33
|
+
"@segment/ajv-human-errors": "^2.1.2",
|
|
34
|
+
"@urql/core": "3.0.5",
|
|
35
|
+
"@urql/exchange-retry": "1.0.0",
|
|
36
|
+
"ajv": "^8.11.0",
|
|
37
|
+
"ajv-formats": "2.1.1",
|
|
35
38
|
"better-opn": "3.0.2",
|
|
36
39
|
"chalk": "4.1.2",
|
|
37
40
|
"cli-progress": "3.11.2",
|
|
38
|
-
"cli-table3": "0.6.2",
|
|
39
41
|
"dateformat": "4.6.3",
|
|
40
42
|
"dotenv": "16.0.3",
|
|
41
43
|
"env-paths": "2.2.0",
|
|
42
44
|
"envinfo": "7.8.1",
|
|
43
45
|
"fast-deep-equal": "3.1.3",
|
|
44
|
-
"fast-glob": "3.2.
|
|
46
|
+
"fast-glob": "3.2.12",
|
|
45
47
|
"figures": "3.2.0",
|
|
46
48
|
"form-data": "4.0.0",
|
|
47
49
|
"fs-extra": "10.1.0",
|
|
48
50
|
"getenv": "1.0.0",
|
|
49
51
|
"gradle-to-js": "2.0.1",
|
|
50
|
-
"graphql": "16.
|
|
52
|
+
"graphql": "16.6.0",
|
|
51
53
|
"graphql-tag": "2.12.6",
|
|
52
54
|
"https-proxy-agent": "5.0.1",
|
|
53
55
|
"ignore": "5.2.0",
|
|
54
56
|
"indent-string": "4.0.0",
|
|
55
|
-
"jks-js": "1.0
|
|
56
|
-
"joi": "17.6.
|
|
57
|
+
"jks-js": "1.1.0",
|
|
58
|
+
"joi": "17.6.4",
|
|
57
59
|
"keychain": "1.3.0",
|
|
58
60
|
"log-symbols": "4.1.0",
|
|
59
61
|
"mime": "3.0.0",
|
|
@@ -64,51 +66,55 @@
|
|
|
64
66
|
"nullthrows": "1.1.1",
|
|
65
67
|
"ora": "5.1.0",
|
|
66
68
|
"pkg-dir": "4.2.0",
|
|
69
|
+
"pngjs": "6.0.0",
|
|
67
70
|
"promise-limit": "2.7.0",
|
|
68
71
|
"promise-retry": "2.0.1",
|
|
69
72
|
"prompts": "2.4.2",
|
|
70
73
|
"qrcode-terminal": "0.12.0",
|
|
71
74
|
"resolve-from": "5.0.0",
|
|
72
|
-
"semver": "7.3.
|
|
75
|
+
"semver": "7.3.8",
|
|
73
76
|
"slash": "3.0.0",
|
|
74
77
|
"tar": "6.1.11",
|
|
75
78
|
"terminal-link": "2.1.1",
|
|
76
79
|
"tslib": "2.4.0",
|
|
77
80
|
"turndown": "7.1.1",
|
|
78
81
|
"untildify": "4.0.0",
|
|
79
|
-
"uuid": "
|
|
82
|
+
"uuid": "9.0.0",
|
|
80
83
|
"wrap-ansi": "7.0.0"
|
|
81
84
|
},
|
|
82
85
|
"devDependencies": {
|
|
83
|
-
"@graphql-codegen/cli": "2.
|
|
86
|
+
"@graphql-codegen/cli": "2.13.7",
|
|
84
87
|
"@graphql-codegen/introspection": "2.2.1",
|
|
85
|
-
"@graphql-codegen/typescript": "2.
|
|
86
|
-
"@graphql-codegen/typescript-operations": "2.5.
|
|
88
|
+
"@graphql-codegen/typescript": "2.8.0",
|
|
89
|
+
"@graphql-codegen/typescript-operations": "2.5.5",
|
|
87
90
|
"@types/cli-progress": "3.11.0",
|
|
88
91
|
"@types/dateformat": "3.0.1",
|
|
89
92
|
"@types/envinfo": "7.8.1",
|
|
93
|
+
"@types/express": "4.17.14",
|
|
90
94
|
"@types/fs-extra": "9.0.13",
|
|
91
95
|
"@types/getenv": "^1.0.0",
|
|
92
|
-
"@types/mime": "
|
|
96
|
+
"@types/mime": "3.0.1",
|
|
93
97
|
"@types/node-fetch": "2.6.2",
|
|
94
|
-
"@types/node-forge": "1.0
|
|
98
|
+
"@types/node-forge": "1.3.0",
|
|
99
|
+
"@types/pngjs": "6.0.1",
|
|
95
100
|
"@types/promise-retry": "1.1.3",
|
|
96
|
-
"@types/prompts": "2.
|
|
97
|
-
"@types/semver": "7.3.
|
|
98
|
-
"@types/tar": "6.1.
|
|
101
|
+
"@types/prompts": "2.4.1",
|
|
102
|
+
"@types/semver": "7.3.12",
|
|
103
|
+
"@types/tar": "6.1.3",
|
|
99
104
|
"@types/tough-cookie": "4.0.2",
|
|
100
105
|
"@types/uuid": "8.3.4",
|
|
101
106
|
"@types/wrap-ansi": "3.0.0",
|
|
102
107
|
"axios": "0.27.2",
|
|
103
108
|
"eslint-plugin-graphql": "4.0.0",
|
|
109
|
+
"express": "4.18.2",
|
|
104
110
|
"memfs": "3.4.7",
|
|
105
111
|
"mockdate": "3.0.5",
|
|
106
112
|
"nock": "13.2.9",
|
|
107
113
|
"rimraf": "3.0.2",
|
|
108
|
-
"ts-deepmerge": "
|
|
114
|
+
"ts-deepmerge": "4.0.0",
|
|
109
115
|
"ts-mockito": "2.6.1",
|
|
110
116
|
"ts-node": "10.9.1",
|
|
111
|
-
"typescript": "4.
|
|
117
|
+
"typescript": "4.8.4"
|
|
112
118
|
},
|
|
113
119
|
"engines": {
|
|
114
120
|
"node": ">=14.0.0"
|
|
@@ -130,7 +136,7 @@
|
|
|
130
136
|
"bin": "eas",
|
|
131
137
|
"commands": "./build/commands",
|
|
132
138
|
"plugins": [
|
|
133
|
-
"@
|
|
139
|
+
"@oclif/plugin-autocomplete",
|
|
134
140
|
"@expo/plugin-help",
|
|
135
141
|
"@expo/plugin-warn-if-update-available"
|
|
136
142
|
],
|
|
@@ -210,5 +216,5 @@
|
|
|
210
216
|
"node": "18.6.0",
|
|
211
217
|
"yarn": "1.22.19"
|
|
212
218
|
},
|
|
213
|
-
"gitHead": "
|
|
219
|
+
"gitHead": "9b668e3629df8c06fbfef79947b8bb9b3716bf29"
|
|
214
220
|
}
|
package/schema/metadata-0.json
CHANGED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import Ajv from 'ajv';
|
|
2
|
-
import { AppleConfigReader } from './apple/config/reader';
|
|
3
|
-
import { AppleConfigWriter } from './apple/config/writer';
|
|
4
|
-
import { AppleMetadata } from './apple/types';
|
|
5
|
-
export interface MetadataConfig {
|
|
6
|
-
/** The store configuration version */
|
|
7
|
-
configVersion: number;
|
|
8
|
-
/** All App Store related configuration */
|
|
9
|
-
apple?: AppleMetadata;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Get the static configuration file path, based on the metadata context.
|
|
13
|
-
* This uses any custom name provided, but swaps out the extension for `.json`.
|
|
14
|
-
*/
|
|
15
|
-
export declare function getStaticConfigFilePath({ projectDir, metadataPath, }: {
|
|
16
|
-
projectDir: string;
|
|
17
|
-
metadataPath: string;
|
|
18
|
-
}): string;
|
|
19
|
-
/**
|
|
20
|
-
* Load the store configuration from a metadata context.
|
|
21
|
-
* This can load `.json` and `.js` config files, using `require`.
|
|
22
|
-
* It throws MetadataValidationErrors when the file doesn't exist, or contains errors.
|
|
23
|
-
* The user is prompted to try anyway when errors are found.
|
|
24
|
-
*/
|
|
25
|
-
export declare function loadConfigAsync({ projectDir, metadataPath, skipValidation, }: {
|
|
26
|
-
projectDir: string;
|
|
27
|
-
metadataPath: string;
|
|
28
|
-
skipValidation?: boolean;
|
|
29
|
-
}): Promise<MetadataConfig>;
|
|
30
|
-
/**
|
|
31
|
-
* Run the JSON Schema validation to normalize defaults and flag early config errors.
|
|
32
|
-
* This includes validating the known store limitations for every configurable property.
|
|
33
|
-
*/
|
|
34
|
-
export declare function validateConfig(config: unknown): {
|
|
35
|
-
valid: boolean;
|
|
36
|
-
errors: Ajv.ErrorObject[];
|
|
37
|
-
};
|
|
38
|
-
/** Create a versioned deserializer to fetch App Store data from the store configuration. */
|
|
39
|
-
export declare function createAppleReader(config: MetadataConfig): AppleConfigReader;
|
|
40
|
-
/** Create the serializer to write the App Store to the store configuration. */
|
|
41
|
-
export declare function createAppleWriter(): AppleConfigWriter;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
|
|
2
|
-
import { App, Session } from '@expo/apple-utils';
|
|
3
|
-
import { ExpoConfig } from '@expo/config';
|
|
4
|
-
import { Platform } from '@expo/eas-build-job';
|
|
5
|
-
import { SubmitProfile } from '@expo/eas-json';
|
|
6
|
-
import { Analytics } from '../analytics/AnalyticsManager';
|
|
7
|
-
import { CredentialsContext } from '../credentials/context';
|
|
8
|
-
import { Actor } from '../user/User';
|
|
9
|
-
export declare type MetadataContext = {
|
|
10
|
-
/** Submission profile platform to use */
|
|
11
|
-
platform: Platform.IOS;
|
|
12
|
-
/** Resolved submission profile configuration */
|
|
13
|
-
profile: SubmitProfile<Platform.IOS>;
|
|
14
|
-
/** Configured store config path, relative from projectDir (defaults to store.config.json) */
|
|
15
|
-
metadataPath: string;
|
|
16
|
-
/** Authenticated Expo account */
|
|
17
|
-
user: Actor;
|
|
18
|
-
/** The store credentials manager */
|
|
19
|
-
credentialsCtx: CredentialsContext;
|
|
20
|
-
/** The analytics manager for EAS cli */
|
|
21
|
-
analytics: Analytics;
|
|
22
|
-
/** The app bundle identifier to use for the store */
|
|
23
|
-
bundleIdentifier: string;
|
|
24
|
-
/** Root of the Expo project directory */
|
|
25
|
-
projectDir: string;
|
|
26
|
-
/** Resolved Expo app configuration */
|
|
27
|
-
exp: ExpoConfig;
|
|
28
|
-
};
|
|
29
|
-
export declare type MetadataAppStoreAuthentication = {
|
|
30
|
-
/** The root entity of the App store */
|
|
31
|
-
app: App;
|
|
32
|
-
/** The authentication state we used to fetch the root entity */
|
|
33
|
-
auth: Partial<Session.AuthState>;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Metadata uses the submission profile to find the configured metadata filename.
|
|
37
|
-
* Note, only iOS is supported for metadata right now.
|
|
38
|
-
*/
|
|
39
|
-
export declare function createMetadataContextAsync(params: {
|
|
40
|
-
projectDir: string;
|
|
41
|
-
credentialsCtx: CredentialsContext;
|
|
42
|
-
analytics: Analytics;
|
|
43
|
-
exp: ExpoConfig;
|
|
44
|
-
profileName?: string;
|
|
45
|
-
}): Promise<MetadataContext>;
|
|
46
|
-
/**
|
|
47
|
-
* To start syncing ASC entities, we need access to the apple utils App instance.
|
|
48
|
-
* This ensures we are authenticated and have the app instance ready to use.
|
|
49
|
-
*/
|
|
50
|
-
export declare function ensureMetadataAppStoreAuthenticatedAsync({ credentialsCtx, bundleIdentifier, }: MetadataContext): Promise<MetadataAppStoreAuthentication>;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureMetadataAppStoreAuthenticatedAsync = exports.createMetadataContextAsync = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const apple_utils_1 = require("@expo/apple-utils");
|
|
6
|
-
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
7
|
-
const eas_json_1 = require("@expo/eas-json");
|
|
8
|
-
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
9
|
-
const authenticate_1 = require("../credentials/ios/appstore/authenticate");
|
|
10
|
-
const bundleIdentifier_1 = require("../project/ios/bundleIdentifier");
|
|
11
|
-
/**
|
|
12
|
-
* Metadata uses the submission profile to find the configured metadata filename.
|
|
13
|
-
* Note, only iOS is supported for metadata right now.
|
|
14
|
-
*/
|
|
15
|
-
async function createMetadataContextAsync(params) {
|
|
16
|
-
var _a, _b;
|
|
17
|
-
const easJsonAccessor = new eas_json_1.EasJsonAccessor(params.projectDir);
|
|
18
|
-
const submitProfile = await eas_json_1.EasJsonUtils.getSubmitProfileAsync(easJsonAccessor, eas_build_job_1.Platform.IOS, params.profileName);
|
|
19
|
-
const exp = params.exp;
|
|
20
|
-
const user = params.credentialsCtx.user;
|
|
21
|
-
const bundleIdentifier = (_a = submitProfile.bundleIdentifier) !== null && _a !== void 0 ? _a : (await (0, bundleIdentifier_1.getBundleIdentifierAsync)(params.projectDir, exp));
|
|
22
|
-
return {
|
|
23
|
-
platform: eas_build_job_1.Platform.IOS,
|
|
24
|
-
profile: submitProfile,
|
|
25
|
-
metadataPath: (_b = submitProfile.metadataPath) !== null && _b !== void 0 ? _b : 'store.config.json',
|
|
26
|
-
user,
|
|
27
|
-
analytics: params.analytics,
|
|
28
|
-
credentialsCtx: params.credentialsCtx,
|
|
29
|
-
bundleIdentifier,
|
|
30
|
-
projectDir: params.projectDir,
|
|
31
|
-
exp,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
exports.createMetadataContextAsync = createMetadataContextAsync;
|
|
35
|
-
/**
|
|
36
|
-
* To start syncing ASC entities, we need access to the apple utils App instance.
|
|
37
|
-
* This ensures we are authenticated and have the app instance ready to use.
|
|
38
|
-
*/
|
|
39
|
-
async function ensureMetadataAppStoreAuthenticatedAsync({ credentialsCtx, bundleIdentifier, }) {
|
|
40
|
-
const authCtx = await credentialsCtx.appStore.ensureAuthenticatedAsync();
|
|
41
|
-
(0, assert_1.default)(authCtx.authState, 'Failed to authenticate with App Store Connect');
|
|
42
|
-
// TODO: improve error handling by mentioning possible configuration errors
|
|
43
|
-
const app = await apple_utils_1.App.findAsync((0, authenticate_1.getRequestContext)(authCtx), { bundleId: bundleIdentifier });
|
|
44
|
-
(0, assert_1.default)(app, `Failed to load app "${bundleIdentifier}" from App Store Connect`);
|
|
45
|
-
return { app, auth: authCtx.authState };
|
|
46
|
-
}
|
|
47
|
-
exports.ensureMetadataAppStoreAuthenticatedAsync = ensureMetadataAppStoreAuthenticatedAsync;
|