eas-cli 0.52.0 → 0.54.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 +132 -44
- package/build/analytics/events.d.ts +5 -1
- package/build/analytics/events.js +6 -1
- package/build/build/android/version.js +1 -1
- package/build/build/build.js +38 -27
- package/build/build/local.js +1 -1
- package/build/build/runBuildAndSubmit.js +4 -2
- package/build/build/utils/url.d.ts +1 -0
- package/build/build/utils/url.js +5 -1
- package/build/commands/branch/create.js +2 -2
- package/build/commands/branch/delete.js +2 -2
- package/build/commands/branch/list.js +2 -2
- package/build/commands/branch/rename.js +2 -2
- package/build/commands/branch/view.js +2 -2
- package/build/commands/build/cancel.js +3 -3
- package/build/commands/build/configure.js +2 -2
- package/build/commands/build/index.d.ts +0 -1
- package/build/commands/build/index.js +1 -53
- package/build/commands/build/inspect.js +1 -1
- package/build/commands/build/list.js +2 -2
- package/build/commands/build/view.js +2 -2
- package/build/commands/channel/create.js +2 -2
- package/build/commands/channel/delete.js +2 -2
- package/build/commands/channel/edit.js +2 -2
- package/build/commands/channel/list.js +2 -2
- package/build/commands/channel/rollout.js +2 -2
- package/build/commands/channel/view.js +3 -3
- package/build/commands/config.js +0 -2
- package/build/commands/device/delete.js +2 -2
- package/build/commands/device/list.js +2 -2
- package/build/commands/device/view.js +2 -2
- package/build/commands/metadata/pull.d.ts +8 -0
- package/build/commands/metadata/pull.js +59 -0
- package/build/commands/metadata/push.d.ts +8 -0
- package/build/commands/metadata/push.js +51 -0
- package/build/commands/project/info.js +2 -2
- package/build/commands/project/init.js +2 -2
- package/build/commands/secret/create.js +2 -2
- package/build/commands/secret/delete.js +2 -2
- package/build/commands/secret/list.js +2 -2
- package/build/commands/submit.js +4 -3
- package/build/commands/update/configure.js +2 -3
- package/build/commands/update/index.d.ts +12 -0
- package/build/commands/update/index.js +81 -39
- package/build/commands/update/list.js +2 -2
- package/build/commands/webhook/create.js +2 -2
- package/build/commands/webhook/delete.js +2 -2
- package/build/commands/webhook/list.js +2 -2
- package/build/credentials/android/utils/googleServiceAccountKey.js +1 -1
- package/build/credentials/android/utils/keystore.js +1 -1
- package/build/credentials/android/utils/keystoreNew.js +2 -2
- package/build/credentials/context.js +2 -3
- package/build/credentials/credentialsJson/read.js +1 -1
- package/build/credentials/ios/utils/provisioningProfile.js +1 -1
- package/build/credentials/ios/validators/validateProvisioningProfile.js +1 -1
- package/build/graphql/generated.d.ts +90 -33
- package/build/graphql/generated.js +5 -0
- package/build/graphql/queries/UpdateQuery.d.ts +4 -1
- package/build/graphql/queries/UpdateQuery.js +8 -7
- package/build/metadata/apple/config/reader.d.ts +25 -0
- package/build/metadata/apple/config/reader.js +95 -0
- package/build/metadata/apple/config/writer.d.ts +23 -0
- package/build/metadata/apple/config/writer.js +85 -0
- package/build/metadata/apple/data.d.ts +20 -0
- package/build/metadata/apple/data.js +2 -0
- package/build/metadata/apple/task.d.ts +24 -0
- package/build/metadata/apple/task.js +6 -0
- package/build/metadata/apple/tasks/age-rating.d.ts +13 -0
- package/build/metadata/apple/tasks/age-rating.js +39 -0
- package/build/metadata/apple/tasks/app-info.d.ts +15 -0
- package/build/metadata/apple/tasks/app-info.js +73 -0
- package/build/metadata/apple/tasks/app-version.d.ts +27 -0
- package/build/metadata/apple/tasks/app-version.js +104 -0
- package/build/metadata/apple/tasks/index.d.ts +6 -0
- package/build/metadata/apple/tasks/index.js +13 -0
- package/build/metadata/apple/types.d.ts +50 -0
- package/build/metadata/apple/types.js +2 -0
- package/build/metadata/config.d.ts +22 -0
- package/build/metadata/config.js +32 -0
- package/build/metadata/context.d.ts +46 -0
- package/build/metadata/context.js +48 -0
- package/build/metadata/download.d.ts +6 -0
- package/build/metadata/download.js +65 -0
- package/build/metadata/errors.d.ts +37 -0
- package/build/metadata/errors.js +69 -0
- package/build/metadata/upload.d.ts +6 -0
- package/build/metadata/upload.js +57 -0
- package/build/metadata/utils/asc.d.ts +4 -0
- package/build/metadata/utils/asc.js +2 -0
- package/build/metadata/utils/date.d.ts +12 -0
- package/build/metadata/utils/date.js +30 -0
- package/build/metadata/utils/log.d.ts +16 -0
- package/build/metadata/utils/log.js +23 -0
- package/build/metadata/utils/retry.d.ts +8 -0
- package/build/metadata/utils/retry.js +22 -0
- package/build/metadata/utils/telemetry.d.ts +20 -0
- package/build/metadata/utils/telemetry.js +87 -0
- package/build/project/android/applicationId.js +1 -1
- package/build/project/ensureProjectExists.js +4 -1
- package/build/project/ios/bundleIdentifier.js +1 -1
- package/build/project/publish.d.ts +6 -1
- package/build/project/publish.js +16 -3
- package/build/submit/ArchiveSource.js +1 -1
- package/build/submit/submit.js +1 -1
- package/build/submit/utils/errors.js +2 -0
- package/build/submit/utils/files.js +1 -1
- package/build/submit/utils/logs.js +1 -1
- package/build/update/android/UpdatesModule.js +2 -2
- package/build/update/ios/UpdatesModule.js +2 -2
- package/build/user/actions.js +1 -1
- package/build/utils/expodash/uniq.d.ts +1 -0
- package/build/utils/expodash/uniq.js +7 -0
- package/build/utils/profiles.d.ts +3 -3
- package/build/utils/profiles.js +5 -93
- package/build/vcs/clients/git.js +5 -5
- package/build/vcs/git.js +1 -1
- package/build/webhooks/input.js +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +43 -38
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const config_1 = require("@expo/config");
|
|
5
4
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
6
5
|
const AppleDeviceQuery_1 = require("../../credentials/ios/api/graphql/queries/AppleDeviceQuery");
|
|
7
6
|
const formatDevice_1 = tslib_1.__importDefault(require("../../devices/utils/formatDevice"));
|
|
8
7
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
9
8
|
const ora_1 = require("../../ora");
|
|
9
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
10
10
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
11
11
|
class DeviceView extends EasCommand_1.default {
|
|
12
12
|
async runAsync() {
|
|
@@ -23,7 +23,7 @@ If you are not sure what is the UDID of the device you are looking for, run:
|
|
|
23
23
|
throw new Error('Device UDID is missing');
|
|
24
24
|
}
|
|
25
25
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
26
|
-
const
|
|
26
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
27
27
|
const accountName = await (0, projectUtils_1.getProjectAccountNameAsync)(exp);
|
|
28
28
|
const spinner = (0, ora_1.ora)().start(`Fetching device details for ${UDID}…`);
|
|
29
29
|
try {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
export default class MetadataPull extends EasCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
};
|
|
7
|
+
runAsync(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const config_1 = require("@expo/config");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
|
+
const path_1 = tslib_1.__importDefault(require("path"));
|
|
8
|
+
const configure_1 = require("../../build/configure");
|
|
9
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
10
|
+
const context_1 = require("../../credentials/context");
|
|
11
|
+
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
12
|
+
const context_2 = require("../../metadata/context");
|
|
13
|
+
const download_1 = require("../../metadata/download");
|
|
14
|
+
const errors_1 = require("../../metadata/errors");
|
|
15
|
+
const projectUtils_1 = require("../../project/projectUtils");
|
|
16
|
+
const actions_1 = require("../../user/actions");
|
|
17
|
+
class MetadataPull extends EasCommand_1.default {
|
|
18
|
+
async runAsync() {
|
|
19
|
+
log_1.default.warn('EAS Metadata is in beta and subject to breaking changes.');
|
|
20
|
+
const { flags } = await this.parse(MetadataPull);
|
|
21
|
+
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
22
|
+
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
23
|
+
await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
24
|
+
await (0, configure_1.ensureProjectConfiguredAsync)({ projectDir, nonInteractive: false });
|
|
25
|
+
const credentialsCtx = new context_1.CredentialsContext({
|
|
26
|
+
exp,
|
|
27
|
+
projectDir,
|
|
28
|
+
user: await (0, actions_1.ensureLoggedInAsync)(),
|
|
29
|
+
nonInteractive: false,
|
|
30
|
+
});
|
|
31
|
+
const metadataCtx = await (0, context_2.createMetadataContextAsync)({
|
|
32
|
+
credentialsCtx,
|
|
33
|
+
projectDir,
|
|
34
|
+
exp,
|
|
35
|
+
profileName: flags.profile,
|
|
36
|
+
});
|
|
37
|
+
try {
|
|
38
|
+
const filePath = await (0, download_1.downloadMetadataAsync)(metadataCtx);
|
|
39
|
+
const relativePath = path_1.default.relative(process.cwd(), filePath);
|
|
40
|
+
log_1.default.addNewLineIfNone();
|
|
41
|
+
log_1.default.log(`🎉 Your store configuration is ready.
|
|
42
|
+
|
|
43
|
+
- Update the ${chalk_1.default.bold(relativePath)} file to prepare the app information.
|
|
44
|
+
- Run ${chalk_1.default.bold('eas submit')} or manually upload a new app version to the app stores.
|
|
45
|
+
- Once the app is uploaded, run ${chalk_1.default.bold('eas metadata:push')} to sync the store configuration.
|
|
46
|
+
- ${(0, log_1.learnMore)('https://docs.expo.dev/eas-metadata/introduction/')}`);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
(0, errors_1.handleMetadataError)(error);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.default = MetadataPull;
|
|
54
|
+
MetadataPull.description = 'generate the local store configuration from the app stores';
|
|
55
|
+
MetadataPull.flags = {
|
|
56
|
+
profile: core_1.Flags.string({
|
|
57
|
+
description: 'Name of the submit profile from eas.json. Defaults to "production" if defined in eas.json.',
|
|
58
|
+
}),
|
|
59
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
export default class MetadataPush extends EasCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
|
|
6
|
+
};
|
|
7
|
+
runAsync(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const config_1 = require("@expo/config");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const configure_1 = require("../../build/configure");
|
|
7
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
8
|
+
const context_1 = require("../../credentials/context");
|
|
9
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
10
|
+
const context_2 = require("../../metadata/context");
|
|
11
|
+
const errors_1 = require("../../metadata/errors");
|
|
12
|
+
const upload_1 = require("../../metadata/upload");
|
|
13
|
+
const projectUtils_1 = require("../../project/projectUtils");
|
|
14
|
+
const actions_1 = require("../../user/actions");
|
|
15
|
+
class MetadataPush extends EasCommand_1.default {
|
|
16
|
+
async runAsync() {
|
|
17
|
+
log_1.default.warn('EAS Metadata is in beta and subject to breaking changes.');
|
|
18
|
+
const { flags } = await this.parse(MetadataPush);
|
|
19
|
+
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
20
|
+
const { exp } = (0, config_1.getConfig)(projectDir, { skipSDKVersionRequirement: true });
|
|
21
|
+
await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
22
|
+
await (0, configure_1.ensureProjectConfiguredAsync)({ projectDir, nonInteractive: false });
|
|
23
|
+
const credentialsCtx = new context_1.CredentialsContext({
|
|
24
|
+
exp,
|
|
25
|
+
projectDir,
|
|
26
|
+
user: await (0, actions_1.ensureLoggedInAsync)(),
|
|
27
|
+
nonInteractive: false,
|
|
28
|
+
});
|
|
29
|
+
const metadataCtx = await (0, context_2.createMetadataContextAsync)({
|
|
30
|
+
credentialsCtx,
|
|
31
|
+
projectDir,
|
|
32
|
+
exp,
|
|
33
|
+
profileName: flags.profile,
|
|
34
|
+
});
|
|
35
|
+
try {
|
|
36
|
+
await (0, upload_1.uploadMetadataAsync)(metadataCtx);
|
|
37
|
+
log_1.default.addNewLineIfNone();
|
|
38
|
+
log_1.default.log(`🎉 Store configuration is synced with the app stores.`);
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
(0, errors_1.handleMetadataError)(error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.default = MetadataPush;
|
|
46
|
+
MetadataPush.description = 'sync the local store configuration to the app stores';
|
|
47
|
+
MetadataPush.flags = {
|
|
48
|
+
profile: core_1.Flags.string({
|
|
49
|
+
description: 'Name of the submit profile from eas.json. Defaults to "production" if defined in eas.json.',
|
|
50
|
+
}),
|
|
51
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const config_1 = require("@expo/config");
|
|
5
4
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
6
5
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
7
6
|
const client_1 = require("../../graphql/client");
|
|
8
7
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
8
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
9
9
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
10
10
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
11
11
|
async function projectInfoByIdAsync(appId) {
|
|
@@ -26,7 +26,7 @@ async function projectInfoByIdAsync(appId) {
|
|
|
26
26
|
class ProjectInfo extends EasCommand_1.default {
|
|
27
27
|
async runAsync() {
|
|
28
28
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
29
|
-
const
|
|
29
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
30
30
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
31
31
|
const { app } = await projectInfoByIdAsync(projectId);
|
|
32
32
|
if (!app) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const config_1 = require("@expo/config");
|
|
5
4
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
5
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
7
6
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
7
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
8
8
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
9
9
|
class ProjectInit extends EasCommand_1.default {
|
|
10
10
|
async runAsync() {
|
|
11
11
|
var _a, _b, _c, _d;
|
|
12
12
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
13
|
-
const
|
|
13
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
14
14
|
if ((_b = (_a = exp.extra) === null || _a === void 0 ? void 0 : _a.eas) === null || _b === void 0 ? void 0 : _b.projectId) {
|
|
15
15
|
log_1.default.error(`app.json is already linked to project with ID: ${chalk_1.default.bold((_d = (_c = exp.extra) === null || _c === void 0 ? void 0 : _c.eas) === null || _d === void 0 ? void 0 : _d.projectId)}`);
|
|
16
16
|
return;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const config_1 = require("@expo/config");
|
|
5
4
|
const core_1 = require("@oclif/core");
|
|
6
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
6
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
8
7
|
const EnvironmentSecretMutation_1 = require("../../graphql/mutations/EnvironmentSecretMutation");
|
|
9
8
|
const EnvironmentSecretsQuery_1 = require("../../graphql/queries/EnvironmentSecretsQuery");
|
|
10
9
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
10
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
11
11
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
12
12
|
const prompts_1 = require("../../prompts");
|
|
13
13
|
const Account_1 = require("../../user/Account");
|
|
@@ -18,7 +18,7 @@ class EnvironmentSecretCreate extends EasCommand_1.default {
|
|
|
18
18
|
const actor = await (0, actions_1.ensureLoggedInAsync)();
|
|
19
19
|
let { flags: { name, value: secretValue, scope, force }, } = await this.parse(EnvironmentSecretCreate);
|
|
20
20
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
21
|
-
const
|
|
21
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
22
22
|
const accountName = await (0, projectUtils_1.getProjectAccountNameAsync)(exp);
|
|
23
23
|
const { slug } = exp;
|
|
24
24
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const config_1 = require("@expo/config");
|
|
5
4
|
const core_1 = require("@oclif/core");
|
|
6
5
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
7
6
|
const EnvironmentSecretMutation_1 = require("../../graphql/mutations/EnvironmentSecretMutation");
|
|
8
7
|
const EnvironmentSecretsQuery_1 = require("../../graphql/queries/EnvironmentSecretsQuery");
|
|
9
8
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
9
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
10
10
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
11
11
|
const prompts_1 = require("../../prompts");
|
|
12
12
|
class EnvironmentSecretDelete extends EasCommand_1.default {
|
|
13
13
|
async runAsync() {
|
|
14
14
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
15
|
-
const
|
|
15
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
16
16
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
17
17
|
const projectAccountName = await (0, projectUtils_1.getProjectAccountNameAsync)(exp);
|
|
18
18
|
let { flags: { id }, } = await this.parse(EnvironmentSecretDelete);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const config_1 = require("@expo/config");
|
|
5
4
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
6
5
|
const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
|
|
7
6
|
const dateformat_1 = tslib_1.__importDefault(require("dateformat"));
|
|
8
7
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
9
8
|
const EnvironmentSecretsQuery_1 = require("../../graphql/queries/EnvironmentSecretsQuery");
|
|
10
9
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
10
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
11
11
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
12
12
|
class EnvironmentSecretList extends EasCommand_1.default {
|
|
13
13
|
async runAsync() {
|
|
14
14
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
15
|
-
const
|
|
15
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
16
16
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
17
17
|
const projectAccountName = await (0, projectUtils_1.getProjectAccountNameAsync)(exp);
|
|
18
18
|
if (!projectDir) {
|
package/build/commands/submit.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const
|
|
4
|
+
const eas_json_1 = require("@expo/eas-json");
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
7
|
const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
|
|
8
8
|
const AppPlatform_1 = require("../graphql/types/AppPlatform");
|
|
9
9
|
const log_1 = tslib_1.__importDefault(require("../log"));
|
|
10
10
|
const platform_1 = require("../platform");
|
|
11
|
+
const expoConfig_1 = require("../project/expoConfig");
|
|
11
12
|
const projectUtils_1 = require("../project/projectUtils");
|
|
12
13
|
const context_1 = require("../submit/context");
|
|
13
14
|
const submit_1 = require("../submit/submit");
|
|
@@ -18,12 +19,12 @@ class Submit extends EasCommand_1.default {
|
|
|
18
19
|
const { flags: rawFlags } = await this.parse(Submit);
|
|
19
20
|
const flags = await this.sanitizeFlagsAsync(rawFlags);
|
|
20
21
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
21
|
-
const
|
|
22
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
22
23
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
23
24
|
const platforms = (0, platform_1.toPlatforms)(flags.requestedPlatform);
|
|
24
25
|
const submissionProfiles = await (0, profiles_1.getProfilesAsync)({
|
|
25
26
|
type: 'submit',
|
|
26
|
-
projectDir,
|
|
27
|
+
easJsonReader: new eas_json_1.EasJsonReader(projectDir),
|
|
27
28
|
platforms,
|
|
28
29
|
profileName: flags.profile,
|
|
29
30
|
});
|
|
@@ -11,6 +11,7 @@ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasComm
|
|
|
11
11
|
const generated_1 = require("../../graphql/generated");
|
|
12
12
|
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
13
13
|
const platform_1 = require("../../platform");
|
|
14
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
14
15
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
15
16
|
const workflow_1 = require("../../project/workflow");
|
|
16
17
|
const UpdatesModule_1 = require("../../update/android/UpdatesModule");
|
|
@@ -23,9 +24,7 @@ class UpdateConfigure extends EasCommand_1.default {
|
|
|
23
24
|
const { flags } = await this.parse(UpdateConfigure);
|
|
24
25
|
const platform = flags.platform;
|
|
25
26
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
26
|
-
const
|
|
27
|
-
skipSDKVersionRequirement: true,
|
|
28
|
-
});
|
|
27
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
29
28
|
if (!(0, projectUtils_1.isExpoUpdatesInstalledOrAvailable)(projectDir, exp.sdkVersion)) {
|
|
30
29
|
await (0, projectUtils_1.installExpoUpdatesAsync)(projectDir);
|
|
31
30
|
}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
import { ViewBranchUpdatesQuery } from '../../graphql/generated';
|
|
2
3
|
import { PublishPlatform } from '../../project/publish';
|
|
3
4
|
export declare const defaultPublishPlatforms: PublishPlatform[];
|
|
5
|
+
export declare type PublishPlatformFlag = PublishPlatform | 'all';
|
|
6
|
+
export declare function ensureBranchExistsAsync({ appId, name: branchName, limit, offset, }: {
|
|
7
|
+
appId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
limit?: number;
|
|
10
|
+
offset?: number;
|
|
11
|
+
}): Promise<{
|
|
12
|
+
id: string;
|
|
13
|
+
updates: Exclude<Exclude<ViewBranchUpdatesQuery['app'], null | undefined>['byId']['updateBranchByName'], null | undefined>['updates'];
|
|
14
|
+
}>;
|
|
4
15
|
export default class UpdatePublish extends EasCommand {
|
|
5
16
|
static description: string;
|
|
6
17
|
static flags: {
|
|
@@ -18,3 +29,4 @@ export default class UpdatePublish extends EasCommand {
|
|
|
18
29
|
};
|
|
19
30
|
runAsync(): Promise<void>;
|
|
20
31
|
}
|
|
32
|
+
export declare function getUpdatesToRepublishInteractiveAsync(projectId: string, branchName: string, platformFlag: string, pageSize: number, offset?: number, cumulativeUpdates?: Exclude<Exclude<ViewBranchUpdatesQuery['app'], null | undefined>['byId']['updateBranchByName'], null | undefined>['updates']): Promise<Exclude<Exclude<ViewBranchUpdatesQuery['app'], null | undefined>['byId']['updateBranchByName'], null | undefined>['updates']>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultPublishPlatforms = void 0;
|
|
3
|
+
exports.getUpdatesToRepublishInteractiveAsync = exports.ensureBranchExistsAsync = exports.defaultPublishPlatforms = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const config_1 = require("@expo/config");
|
|
6
5
|
const config_plugins_1 = require("@expo/config-plugins");
|
|
7
6
|
const eas_build_job_1 = require("@expo/eas-build-job");
|
|
8
7
|
const core_1 = require("@oclif/core");
|
|
@@ -12,18 +11,21 @@ const dateformat_1 = tslib_1.__importDefault(require("dateformat"));
|
|
|
12
11
|
const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
|
13
12
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
14
13
|
const api_1 = require("../../api");
|
|
14
|
+
const url_1 = require("../../build/utils/url");
|
|
15
15
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
16
16
|
const fetch_1 = tslib_1.__importDefault(require("../../fetch"));
|
|
17
17
|
const client_1 = require("../../graphql/client");
|
|
18
18
|
const PublishMutation_1 = require("../../graphql/mutations/PublishMutation");
|
|
19
19
|
const UpdateQuery_1 = require("../../graphql/queries/UpdateQuery");
|
|
20
|
-
const log_1 = tslib_1.
|
|
20
|
+
const log_1 = tslib_1.__importStar(require("../../log"));
|
|
21
21
|
const ora_1 = require("../../ora");
|
|
22
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
22
23
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
23
24
|
const publish_1 = require("../../project/publish");
|
|
24
25
|
const workflow_1 = require("../../project/workflow");
|
|
25
26
|
const prompts_1 = require("../../prompts");
|
|
26
27
|
const utils_1 = require("../../update/utils");
|
|
28
|
+
const actions_1 = require("../../user/actions");
|
|
27
29
|
const code_signing_1 = require("../../utils/code-signing");
|
|
28
30
|
const uniqBy_1 = tslib_1.__importDefault(require("../../utils/expodash/uniqBy"));
|
|
29
31
|
const formatFields_1 = tslib_1.__importDefault(require("../../utils/formatFields"));
|
|
@@ -70,10 +72,12 @@ async function ensureChannelExistsAsync({ appId, branchId, channelName, }) {
|
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
|
-
async function ensureBranchExistsAsync({ appId, name: branchName, }) {
|
|
75
|
+
async function ensureBranchExistsAsync({ appId, name: branchName, limit, offset, }) {
|
|
74
76
|
const { app } = await UpdateQuery_1.UpdateQuery.viewBranchAsync({
|
|
75
77
|
appId,
|
|
76
78
|
name: branchName,
|
|
79
|
+
limit,
|
|
80
|
+
offset,
|
|
77
81
|
});
|
|
78
82
|
const updateBranch = app === null || app === void 0 ? void 0 : app.byId.updateBranchByName;
|
|
79
83
|
if (updateBranch) {
|
|
@@ -86,6 +90,7 @@ async function ensureBranchExistsAsync({ appId, name: branchName, }) {
|
|
|
86
90
|
await ensureChannelExistsAsync({ appId, branchId: newUpdateBranch.id, channelName: branchName });
|
|
87
91
|
return { id: newUpdateBranch.id, updates: [] };
|
|
88
92
|
}
|
|
93
|
+
exports.ensureBranchExistsAsync = ensureBranchExistsAsync;
|
|
89
94
|
class UpdatePublish extends EasCommand_1.default {
|
|
90
95
|
async runAsync() {
|
|
91
96
|
var _a, _b, _c;
|
|
@@ -97,12 +102,10 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
97
102
|
// If a group was specified, that means we are republishing it.
|
|
98
103
|
republish = group ? true : republish;
|
|
99
104
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
100
|
-
const
|
|
101
|
-
skipSDKVersionRequirement: true,
|
|
105
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir, {
|
|
102
106
|
isPublicConfig: true,
|
|
103
107
|
});
|
|
104
|
-
const
|
|
105
|
-
skipSDKVersionRequirement: true,
|
|
108
|
+
const expPrivate = (0, expoConfig_1.getExpoConfig)(projectDir, {
|
|
106
109
|
isPublicConfig: false,
|
|
107
110
|
});
|
|
108
111
|
const codeSigningInfo = await (0, code_signing_1.getCodeSigningInfoAsync)(expPrivate, privateKeyPath);
|
|
@@ -161,12 +164,9 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
161
164
|
}
|
|
162
165
|
(0, assert_1.default)(branchName, 'Branch name must be specified.');
|
|
163
166
|
}
|
|
164
|
-
const { id: branchId, updates } = await ensureBranchExistsAsync({
|
|
165
|
-
appId: projectId,
|
|
166
|
-
name: branchName,
|
|
167
|
-
});
|
|
168
167
|
let unsortedUpdateInfoGroups = {};
|
|
169
168
|
let oldMessage, oldRuntimeVersion;
|
|
169
|
+
let uploadedAssetCount = 0;
|
|
170
170
|
if (republish) {
|
|
171
171
|
// If we are republishing, we don't need to worry about building the bundle or uploading the assets.
|
|
172
172
|
// Instead we get the `updateInfoGroup` from the update we wish to republish.
|
|
@@ -182,26 +182,13 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
182
182
|
if (jsonFlag) {
|
|
183
183
|
throw new Error('You must specify the update group to republish.');
|
|
184
184
|
}
|
|
185
|
-
|
|
186
|
-
.filter(update => {
|
|
187
|
-
// Only show groups that have updates on the specified platform(s).
|
|
188
|
-
return platformFlag === 'all' || update.platform === platformFlag;
|
|
189
|
-
})
|
|
190
|
-
.map(update => ({
|
|
191
|
-
title: formatUpdateTitle(update),
|
|
192
|
-
value: update.group,
|
|
193
|
-
}));
|
|
194
|
-
if (updateGroups.length === 0) {
|
|
195
|
-
throw new Error(`There are no updates on branch "${branchName}" published on the platform(s) ${platformFlag}. Did you mean to publish a new update instead?`);
|
|
196
|
-
}
|
|
197
|
-
const selectedUpdateGroup = await (0, prompts_1.selectAsync)('which update would you like to republish?', updateGroups);
|
|
198
|
-
updatesToRepublish = updates.filter(update => update.group === selectedUpdateGroup);
|
|
185
|
+
updatesToRepublish = await getUpdatesToRepublishInteractiveAsync(projectId, branchName, platformFlag, 50);
|
|
199
186
|
}
|
|
200
187
|
const updatesToRepublishFilteredByPlatform = updatesToRepublish.filter(
|
|
201
188
|
// Only republish to the specified platforms
|
|
202
189
|
update => platformFlag === 'all' || update.platform === platformFlag);
|
|
203
190
|
if (updatesToRepublishFilteredByPlatform.length === 0) {
|
|
204
|
-
throw new Error(`There are no updates on branch "${branchName}" published
|
|
191
|
+
throw new Error(`There are no updates on branch "${branchName}" published for the platform(s) "${platformFlag}" with group ID "${group ? group : updatesToRepublish[0].group}". Did you mean to publish a new update instead?`);
|
|
205
192
|
}
|
|
206
193
|
let publicationPlatformMessage;
|
|
207
194
|
if (platformFlag === 'all') {
|
|
@@ -278,9 +265,13 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
278
265
|
try {
|
|
279
266
|
const platforms = platformFlag === 'all' ? exports.defaultPublishPlatforms : [platformFlag];
|
|
280
267
|
const assets = await (0, publish_1.collectAssetsAsync)({ inputDir: inputDir, platforms });
|
|
281
|
-
await (0, publish_1.uploadAssetsAsync)(assets);
|
|
268
|
+
const { uniqueUploadedAssetCount } = await (0, publish_1.uploadAssetsAsync)(assets, spinnerText => (assetSpinner.text = `Uploading assets... ${spinnerText}`));
|
|
269
|
+
uploadedAssetCount = uniqueUploadedAssetCount;
|
|
282
270
|
unsortedUpdateInfoGroups = await (0, publish_1.buildUnsortedUpdateInfoGroupAsync)(assets, exp);
|
|
283
|
-
|
|
271
|
+
const uploadAssetSuccessMessage = uploadedAssetCount
|
|
272
|
+
? `Uploaded ${uploadedAssetCount} ${uploadedAssetCount === 1 ? 'asset' : 'assets'}!`
|
|
273
|
+
: `Uploading assets skipped -- no new assets found!`;
|
|
274
|
+
assetSpinner.succeed(uploadAssetSuccessMessage);
|
|
284
275
|
}
|
|
285
276
|
catch (e) {
|
|
286
277
|
assetSpinner.fail('Failed to upload assets');
|
|
@@ -293,6 +284,11 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
293
284
|
.filter(pair => pair[1] === runtime)
|
|
294
285
|
.map(pair => pair[0]);
|
|
295
286
|
}
|
|
287
|
+
const { id: branchId } = await ensureBranchExistsAsync({
|
|
288
|
+
appId: projectId,
|
|
289
|
+
name: branchName,
|
|
290
|
+
limit: 0,
|
|
291
|
+
});
|
|
296
292
|
// Sort the updates into different groups based on their platform specific runtime versions
|
|
297
293
|
const updateGroups = Object.entries(runtimeToPlatformMapping).map(([runtime, platforms]) => {
|
|
298
294
|
const localUpdateInfoGroup = Object.fromEntries(platforms.map(platform => [
|
|
@@ -357,19 +353,29 @@ class UpdatePublish extends EasCommand_1.default {
|
|
|
357
353
|
}
|
|
358
354
|
log_1.default.addNewLineIfNone();
|
|
359
355
|
for (const runtime of new Set(Object.values(runtimeVersions))) {
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
.map(update => update.platform);
|
|
363
|
-
const newUpdate = newUpdates.find(update => update.runtimeVersion === runtime);
|
|
364
|
-
if (!newUpdate) {
|
|
356
|
+
const newUpdatesForRuntimeVersion = newUpdates.filter(update => update.runtimeVersion === runtime);
|
|
357
|
+
if (!newUpdatesForRuntimeVersion.length) {
|
|
365
358
|
throw new Error(`Publish response is missing updates with runtime ${runtime}.`);
|
|
366
359
|
}
|
|
360
|
+
const platforms = newUpdatesForRuntimeVersion.map(update => update.platform);
|
|
361
|
+
const newAndroidUpdate = newUpdatesForRuntimeVersion.find(update => update.platform === 'android');
|
|
362
|
+
const newIosUpdate = newUpdatesForRuntimeVersion.find(update => update.platform === 'ios');
|
|
363
|
+
const updateGroupId = newUpdatesForRuntimeVersion[0].group;
|
|
364
|
+
const projectName = exp.slug;
|
|
365
|
+
const accountName = (0, projectUtils_1.getProjectAccountName)(exp, await (0, actions_1.ensureLoggedInAsync)());
|
|
366
|
+
const updateGroupUrl = (0, url_1.getUpdateGroupUrl)(accountName, projectName, updateGroupId);
|
|
367
|
+
const updateGroupLink = (0, log_1.link)(updateGroupUrl, { dim: false });
|
|
367
368
|
log_1.default.log((0, formatFields_1.default)([
|
|
368
|
-
{ label: '
|
|
369
|
-
{ label: '
|
|
370
|
-
{ label: '
|
|
371
|
-
{ label: '
|
|
372
|
-
|
|
369
|
+
{ label: 'Branch', value: branchName },
|
|
370
|
+
{ label: 'Runtime version', value: runtime },
|
|
371
|
+
{ label: 'Platform', value: platforms.join(', ') },
|
|
372
|
+
{ label: 'Update group ID', value: updateGroupId },
|
|
373
|
+
...(newAndroidUpdate
|
|
374
|
+
? [{ label: 'Android update ID', value: newAndroidUpdate.id }]
|
|
375
|
+
: []),
|
|
376
|
+
...(newIosUpdate ? [{ label: 'iOS update ID', value: newIosUpdate.id }] : []),
|
|
377
|
+
{ label: 'Message', value: message },
|
|
378
|
+
{ label: 'Website link', value: updateGroupLink },
|
|
373
379
|
]));
|
|
374
380
|
log_1.default.addNewLineIfNone();
|
|
375
381
|
}
|
|
@@ -427,6 +433,42 @@ UpdatePublish.flags = {
|
|
|
427
433
|
description: 'Run command in non-interactive mode',
|
|
428
434
|
}),
|
|
429
435
|
};
|
|
436
|
+
async function getUpdatesToRepublishInteractiveAsync(projectId, branchName, platformFlag, pageSize, offset = 0, cumulativeUpdates = []) {
|
|
437
|
+
const fetchMoreValue = '_fetchMore';
|
|
438
|
+
const { updates } = await ensureBranchExistsAsync({
|
|
439
|
+
appId: projectId,
|
|
440
|
+
name: branchName,
|
|
441
|
+
limit: pageSize + 1,
|
|
442
|
+
offset,
|
|
443
|
+
});
|
|
444
|
+
cumulativeUpdates = [
|
|
445
|
+
...cumulativeUpdates,
|
|
446
|
+
// drop that extra item used for pagination from our render logic
|
|
447
|
+
...updates.slice(0, updates.length - 1),
|
|
448
|
+
];
|
|
449
|
+
const cumulativeUpdatesForTargetPlatforms = platformFlag === 'all'
|
|
450
|
+
? cumulativeUpdates
|
|
451
|
+
: cumulativeUpdates.filter(update => {
|
|
452
|
+
// Only show groups that have updates on the specified platform(s).
|
|
453
|
+
return update.platform === platformFlag;
|
|
454
|
+
});
|
|
455
|
+
const updateGroups = (0, uniqBy_1.default)(cumulativeUpdatesForTargetPlatforms, u => u.group).map(update => ({
|
|
456
|
+
title: formatUpdateTitle(update),
|
|
457
|
+
value: update.group,
|
|
458
|
+
}));
|
|
459
|
+
if (!updateGroups.length) {
|
|
460
|
+
throw new Error(`There are no updates on branch "${branchName}" published for the platform(s) ${platformFlag}. Did you mean to publish a new update instead?`);
|
|
461
|
+
}
|
|
462
|
+
if (updates.length > pageSize) {
|
|
463
|
+
updateGroups.push({ title: 'Next page...', value: fetchMoreValue });
|
|
464
|
+
}
|
|
465
|
+
const selectedUpdateGroup = await (0, prompts_1.selectAsync)('Which update would you like to republish?', updateGroups);
|
|
466
|
+
if (selectedUpdateGroup === fetchMoreValue) {
|
|
467
|
+
return await getUpdatesToRepublishInteractiveAsync(projectId, branchName, platformFlag, pageSize, offset + pageSize, cumulativeUpdates);
|
|
468
|
+
}
|
|
469
|
+
return cumulativeUpdates.filter(update => update.group === selectedUpdateGroup);
|
|
470
|
+
}
|
|
471
|
+
exports.getUpdatesToRepublishInteractiveAsync = getUpdatesToRepublishInteractiveAsync;
|
|
430
472
|
async function getRuntimeVersionObjectAsync(exp, platformFlag, projectDir) {
|
|
431
473
|
var _a, _b;
|
|
432
474
|
const platforms = (platformFlag === 'all' ? ['android', 'ios'] : [platformFlag]);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const config_1 = require("@expo/config");
|
|
5
4
|
const core_1 = require("@oclif/core");
|
|
6
5
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
7
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
@@ -9,6 +8,7 @@ const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
|
|
|
9
8
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
10
9
|
const UpdateQuery_1 = require("../../graphql/queries/UpdateQuery");
|
|
11
10
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
11
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
12
12
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
13
13
|
const prompts_1 = require("../../prompts");
|
|
14
14
|
const utils_1 = require("../../update/utils");
|
|
@@ -23,7 +23,7 @@ class BranchView extends EasCommand_1.default {
|
|
|
23
23
|
(0, json_1.enableJsonOutput)();
|
|
24
24
|
}
|
|
25
25
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
26
|
-
const
|
|
26
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
27
27
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
28
28
|
let updateGroupDescriptions;
|
|
29
29
|
if (all) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const config_1 = require("@expo/config");
|
|
5
4
|
const core_1 = require("@oclif/core");
|
|
6
5
|
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
7
6
|
const generated_1 = require("../../graphql/generated");
|
|
8
7
|
const WebhookMutation_1 = require("../../graphql/mutations/WebhookMutation");
|
|
9
8
|
const ora_1 = require("../../ora");
|
|
9
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
10
10
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
11
11
|
const input_1 = require("../../webhooks/input");
|
|
12
12
|
class WebhookCreate extends EasCommand_1.default {
|
|
@@ -14,7 +14,7 @@ class WebhookCreate extends EasCommand_1.default {
|
|
|
14
14
|
const { flags } = await this.parse(WebhookCreate);
|
|
15
15
|
const webhookInputParams = await (0, input_1.prepareInputParamsAsync)(flags);
|
|
16
16
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
17
|
-
const
|
|
17
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
18
18
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
19
19
|
const spinner = (0, ora_1.ora)('Creating a webhook').start();
|
|
20
20
|
try {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const config_1 = require("@expo/config");
|
|
5
4
|
const assert_1 = tslib_1.__importDefault(require("assert"));
|
|
6
5
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
6
|
const nullthrows_1 = tslib_1.__importDefault(require("nullthrows"));
|
|
@@ -10,6 +9,7 @@ const WebhookMutation_1 = require("../../graphql/mutations/WebhookMutation");
|
|
|
10
9
|
const WebhookQuery_1 = require("../../graphql/queries/WebhookQuery");
|
|
11
10
|
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
12
11
|
const ora_1 = require("../../ora");
|
|
12
|
+
const expoConfig_1 = require("../../project/expoConfig");
|
|
13
13
|
const projectUtils_1 = require("../../project/projectUtils");
|
|
14
14
|
const prompts_1 = require("../../prompts");
|
|
15
15
|
const formatWebhook_1 = require("../../webhooks/formatWebhook");
|
|
@@ -17,7 +17,7 @@ class WebhookDelete extends EasCommand_1.default {
|
|
|
17
17
|
async runAsync() {
|
|
18
18
|
let { args: { ID: webhookId }, } = await this.parse(WebhookDelete);
|
|
19
19
|
const projectDir = await (0, projectUtils_1.findProjectRootAsync)();
|
|
20
|
-
const
|
|
20
|
+
const exp = (0, expoConfig_1.getExpoConfig)(projectDir);
|
|
21
21
|
const projectId = await (0, projectUtils_1.getProjectIdAsync)(exp);
|
|
22
22
|
let webhook = webhookId && (await WebhookQuery_1.WebhookQuery.byIdAsync(webhookId));
|
|
23
23
|
if (!webhookId) {
|