eas-cli 12.5.4 → 12.6.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.
Files changed (147) hide show
  1. package/README.md +131 -60
  2. package/build/build/evaluateConfigWithEnvVarsAsync.js +27 -11
  3. package/build/channel/queries.js +12 -3
  4. package/build/commandUtils/EasCommand.d.ts +36 -5
  5. package/build/commandUtils/EasCommand.js +27 -2
  6. package/build/commandUtils/context/ContextField.d.ts +5 -0
  7. package/build/commandUtils/context/DynamicLoggedInContextField.d.ts +14 -0
  8. package/build/commandUtils/context/DynamicLoggedInContextField.js +25 -0
  9. package/build/commandUtils/context/DynamicProjectConfigContextField.d.ts +2 -2
  10. package/build/commandUtils/context/DynamicProjectConfigContextField.js +40 -2
  11. package/build/commandUtils/context/LoggedInContextField.d.ts +7 -7
  12. package/build/commandUtils/context/LoggedInContextField.js +2 -1
  13. package/build/commandUtils/context/MaybeLoggedInContextField.d.ts +9 -7
  14. package/build/commandUtils/context/MaybeLoggedInContextField.js +1 -0
  15. package/build/commandUtils/context/OptionalPrivateProjectConfigContextField.d.ts +1 -1
  16. package/build/commandUtils/context/OptionalPrivateProjectConfigContextField.js +17 -2
  17. package/build/commandUtils/context/PrivateProjectConfigContextField.d.ts +1 -1
  18. package/build/commandUtils/context/PrivateProjectConfigContextField.js +17 -2
  19. package/build/commandUtils/context/ProjectIdContextField.d.ts +4 -0
  20. package/build/commandUtils/context/ProjectIdContextField.js +19 -0
  21. package/build/commandUtils/context/ServerSideEnvironmentVariablesContextField.d.ts +6 -0
  22. package/build/commandUtils/context/ServerSideEnvironmentVariablesContextField.js +36 -0
  23. package/build/commandUtils/context/contextUtils/loadServerSideEnvironmentVariablesAsync.d.ts +7 -0
  24. package/build/commandUtils/context/contextUtils/loadServerSideEnvironmentVariablesAsync.js +42 -0
  25. package/build/commands/account/view.d.ts +0 -1
  26. package/build/commands/account/view.js +2 -3
  27. package/build/commands/branch/create.d.ts +1 -1
  28. package/build/commands/branch/create.js +2 -2
  29. package/build/commands/branch/delete.d.ts +1 -1
  30. package/build/commands/branch/delete.js +2 -2
  31. package/build/commands/branch/list.d.ts +1 -1
  32. package/build/commands/branch/list.js +2 -2
  33. package/build/commands/branch/rename.d.ts +1 -1
  34. package/build/commands/branch/rename.js +2 -2
  35. package/build/commands/branch/view.d.ts +1 -1
  36. package/build/commands/branch/view.js +2 -2
  37. package/build/commands/build/cancel.d.ts +1 -1
  38. package/build/commands/build/cancel.js +2 -2
  39. package/build/commands/build/configure.js +1 -0
  40. package/build/commands/build/delete.d.ts +1 -1
  41. package/build/commands/build/delete.js +2 -2
  42. package/build/commands/build/index.js +1 -0
  43. package/build/commands/build/inspect.js +1 -0
  44. package/build/commands/build/internal.js +1 -0
  45. package/build/commands/build/list.d.ts +1 -1
  46. package/build/commands/build/list.js +2 -2
  47. package/build/commands/build/resign.js +1 -0
  48. package/build/commands/build/run.d.ts +1 -2
  49. package/build/commands/build/run.js +2 -3
  50. package/build/commands/build/version/get.js +1 -0
  51. package/build/commands/build/version/set.js +1 -0
  52. package/build/commands/build/version/sync.js +1 -0
  53. package/build/commands/build/view.d.ts +1 -1
  54. package/build/commands/build/view.js +2 -2
  55. package/build/commands/channel/create.d.ts +1 -1
  56. package/build/commands/channel/create.js +2 -2
  57. package/build/commands/channel/delete.d.ts +1 -1
  58. package/build/commands/channel/delete.js +2 -2
  59. package/build/commands/channel/edit.d.ts +1 -1
  60. package/build/commands/channel/edit.js +2 -2
  61. package/build/commands/channel/list.d.ts +1 -1
  62. package/build/commands/channel/list.js +2 -2
  63. package/build/commands/channel/pause.d.ts +22 -0
  64. package/build/commands/channel/pause.js +90 -0
  65. package/build/commands/channel/resume.d.ts +22 -0
  66. package/build/commands/channel/resume.js +90 -0
  67. package/build/commands/channel/rollout.js +1 -0
  68. package/build/commands/channel/view.d.ts +1 -1
  69. package/build/commands/channel/view.js +2 -2
  70. package/build/commands/config.d.ts +1 -1
  71. package/build/commands/config.js +4 -7
  72. package/build/commands/credentials/configure-build.js +1 -0
  73. package/build/commands/credentials/index.d.ts +1 -1
  74. package/build/commands/credentials/index.js +2 -1
  75. package/build/commands/device/create.d.ts +1 -1
  76. package/build/commands/device/create.js +2 -1
  77. package/build/commands/device/delete.d.ts +1 -1
  78. package/build/commands/device/delete.js +2 -2
  79. package/build/commands/device/list.d.ts +1 -1
  80. package/build/commands/device/list.js +2 -2
  81. package/build/commands/device/rename.d.ts +1 -1
  82. package/build/commands/device/rename.js +2 -2
  83. package/build/commands/device/view.d.ts +1 -1
  84. package/build/commands/device/view.js +2 -2
  85. package/build/commands/env/create.d.ts +1 -1
  86. package/build/commands/env/create.js +8 -3
  87. package/build/commands/env/delete.d.ts +1 -1
  88. package/build/commands/env/delete.js +2 -2
  89. package/build/commands/env/exec.d.ts +1 -1
  90. package/build/commands/env/exec.js +2 -2
  91. package/build/commands/env/get.d.ts +1 -1
  92. package/build/commands/env/get.js +2 -2
  93. package/build/commands/env/link.d.ts +1 -1
  94. package/build/commands/env/link.js +2 -2
  95. package/build/commands/env/list.d.ts +1 -1
  96. package/build/commands/env/list.js +2 -2
  97. package/build/commands/env/pull.d.ts +2 -1
  98. package/build/commands/env/pull.js +22 -8
  99. package/build/commands/env/push.d.ts +1 -2
  100. package/build/commands/env/push.js +21 -10
  101. package/build/commands/env/unlink.d.ts +1 -1
  102. package/build/commands/env/unlink.js +2 -2
  103. package/build/commands/env/update.d.ts +1 -1
  104. package/build/commands/env/update.js +8 -6
  105. package/build/commands/metadata/pull.js +1 -0
  106. package/build/commands/metadata/push.js +1 -0
  107. package/build/commands/open.js +1 -0
  108. package/build/commands/project/info.d.ts +1 -1
  109. package/build/commands/project/info.js +2 -2
  110. package/build/commands/secret/create.d.ts +1 -1
  111. package/build/commands/secret/create.js +2 -2
  112. package/build/commands/secret/delete.d.ts +1 -1
  113. package/build/commands/secret/delete.js +2 -2
  114. package/build/commands/secret/list.d.ts +1 -1
  115. package/build/commands/secret/list.js +2 -2
  116. package/build/commands/secret/push.d.ts +1 -1
  117. package/build/commands/secret/push.js +2 -2
  118. package/build/commands/submit/internal.js +1 -0
  119. package/build/commands/submit.js +1 -0
  120. package/build/commands/update/configure.js +1 -0
  121. package/build/commands/update/edit.d.ts +2 -2
  122. package/build/commands/update/edit.js +41 -4
  123. package/build/commands/update/index.d.ts +2 -0
  124. package/build/commands/update/index.js +29 -3
  125. package/build/commands/update/list.d.ts +1 -1
  126. package/build/commands/update/list.js +2 -2
  127. package/build/commands/update/republish.js +1 -0
  128. package/build/commands/update/roll-back-to-embedded.js +1 -0
  129. package/build/commands/webhook/create.d.ts +1 -1
  130. package/build/commands/webhook/create.js +2 -2
  131. package/build/commands/webhook/delete.d.ts +1 -1
  132. package/build/commands/webhook/delete.js +2 -2
  133. package/build/commands/webhook/list.d.ts +1 -1
  134. package/build/commands/webhook/list.js +2 -2
  135. package/build/commands/worker/alias.js +1 -0
  136. package/build/commands/worker/deploy.js +1 -1
  137. package/build/graphql/generated.d.ts +147 -19
  138. package/build/graphql/generated.js +19 -2
  139. package/build/graphql/mutations/EnvironmentVariableMutation.d.ts +1 -0
  140. package/build/graphql/queries/ChannelQuery.js +2 -0
  141. package/build/project/publish.d.ts +2 -1
  142. package/build/project/publish.js +10 -4
  143. package/build/user/SessionManager.d.ts +1 -1
  144. package/build/utils/expoCli.d.ts +2 -1
  145. package/build/utils/expoCli.js +5 -1
  146. package/oclif.manifest.json +187 -82
  147. package/package.json +2 -2
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.pauseUpdateChannelAsync = void 0;
5
+ const tslib_1 = require("tslib");
6
+ const core_1 = require("@oclif/core");
7
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
+ const graphql_1 = require("graphql");
9
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
10
+ const queries_1 = require("../../channel/queries");
11
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
12
+ const flags_1 = require("../../commandUtils/flags");
13
+ const client_1 = require("../../graphql/client");
14
+ const ChannelQuery_1 = require("../../graphql/queries/ChannelQuery");
15
+ const UpdateChannelBasicInfo_1 = require("../../graphql/types/UpdateChannelBasicInfo");
16
+ const log_1 = tslib_1.__importDefault(require("../../log"));
17
+ const json_1 = require("../../utils/json");
18
+ async function pauseUpdateChannelAsync(graphqlClient, { channelId }) {
19
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
20
+ .mutation((0, graphql_tag_1.default) `
21
+ mutation PauseUpdateChannel($channelId: ID!) {
22
+ updateChannel {
23
+ pauseUpdateChannel(channelId: $channelId) {
24
+ id
25
+ ...UpdateChannelBasicInfoFragment
26
+ }
27
+ }
28
+ }
29
+ ${(0, graphql_1.print)(UpdateChannelBasicInfo_1.UpdateChannelBasicInfoFragmentNode)}
30
+ `, { channelId })
31
+ .toPromise());
32
+ const channel = data.updateChannel.pauseUpdateChannel;
33
+ if (!channel) {
34
+ throw new Error(`Could not find a channel with id: ${channelId}`);
35
+ }
36
+ return channel;
37
+ }
38
+ exports.pauseUpdateChannelAsync = pauseUpdateChannelAsync;
39
+ class ChannelPause extends EasCommand_1.default {
40
+ async runAsync() {
41
+ const { args, flags: { json, 'non-interactive': nonInteractive }, } = await this.parse(_a);
42
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
43
+ nonInteractive,
44
+ });
45
+ if (json) {
46
+ (0, json_1.enableJsonOutput)();
47
+ }
48
+ const existingChannel = args.name
49
+ ? await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
50
+ appId: projectId,
51
+ channelName: args.name,
52
+ })
53
+ : await (0, queries_1.selectChannelOnAppAsync)(graphqlClient, {
54
+ projectId,
55
+ selectionPromptTitle: 'Select a channel to edit',
56
+ paginatedQueryOptions: { json, nonInteractive, offset: 0 },
57
+ });
58
+ const channel = await pauseUpdateChannelAsync(graphqlClient, {
59
+ channelId: existingChannel.id,
60
+ });
61
+ if (json) {
62
+ (0, json_1.printJsonOnlyOutput)(channel);
63
+ }
64
+ else {
65
+ log_1.default.withTick((0, chalk_1.default) `Channel {bold ${channel.name}} is now paused.\n`);
66
+ log_1.default.addNewLineIfNone();
67
+ log_1.default.log((0, chalk_1.default) `Users with builds on channel {bold ${channel.name}} will no longer receive updates.`);
68
+ }
69
+ }
70
+ }
71
+ _a = ChannelPause;
72
+ ChannelPause.description = 'pause a channel to stop it from sending updates';
73
+ ChannelPause.args = [
74
+ {
75
+ name: 'name',
76
+ required: false,
77
+ description: 'Name of the channel to edit',
78
+ },
79
+ ];
80
+ ChannelPause.flags = {
81
+ branch: core_1.Flags.string({
82
+ description: 'Name of the branch to point to',
83
+ }),
84
+ ...flags_1.EasNonInteractiveAndJsonFlags,
85
+ };
86
+ ChannelPause.contextDefinition = {
87
+ ..._a.ContextOptions.ProjectId,
88
+ ..._a.ContextOptions.LoggedIn,
89
+ };
90
+ exports.default = ChannelPause;
@@ -0,0 +1,22 @@
1
+ import EasCommand from '../../commandUtils/EasCommand';
2
+ import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
3
+ import { ResumeUpdateChannelMutationVariables, UpdateChannelBasicInfoFragment } from '../../graphql/generated';
4
+ export declare function resumeUpdateChannelAsync(graphqlClient: ExpoGraphqlClient, { channelId }: ResumeUpdateChannelMutationVariables): Promise<UpdateChannelBasicInfoFragment>;
5
+ export default class ChannelResume extends EasCommand {
6
+ static description: string;
7
+ static args: {
8
+ name: string;
9
+ required: boolean;
10
+ description: string;
11
+ }[];
12
+ static flags: {
13
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ 'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
+ branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
16
+ };
17
+ static contextDefinition: {
18
+ loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
19
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
20
+ };
21
+ runAsync(): Promise<void>;
22
+ }
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.resumeUpdateChannelAsync = void 0;
5
+ const tslib_1 = require("tslib");
6
+ const core_1 = require("@oclif/core");
7
+ const chalk_1 = tslib_1.__importDefault(require("chalk"));
8
+ const graphql_1 = require("graphql");
9
+ const graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
10
+ const queries_1 = require("../../channel/queries");
11
+ const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
12
+ const flags_1 = require("../../commandUtils/flags");
13
+ const client_1 = require("../../graphql/client");
14
+ const ChannelQuery_1 = require("../../graphql/queries/ChannelQuery");
15
+ const UpdateChannelBasicInfo_1 = require("../../graphql/types/UpdateChannelBasicInfo");
16
+ const log_1 = tslib_1.__importDefault(require("../../log"));
17
+ const json_1 = require("../../utils/json");
18
+ async function resumeUpdateChannelAsync(graphqlClient, { channelId }) {
19
+ const data = await (0, client_1.withErrorHandlingAsync)(graphqlClient
20
+ .mutation((0, graphql_tag_1.default) `
21
+ mutation ResumeUpdateChannel($channelId: ID!) {
22
+ updateChannel {
23
+ resumeUpdateChannel(channelId: $channelId) {
24
+ id
25
+ ...UpdateChannelBasicInfoFragment
26
+ }
27
+ }
28
+ }
29
+ ${(0, graphql_1.print)(UpdateChannelBasicInfo_1.UpdateChannelBasicInfoFragmentNode)}
30
+ `, { channelId })
31
+ .toPromise());
32
+ const channel = data.updateChannel.resumeUpdateChannel;
33
+ if (!channel) {
34
+ throw new Error(`Could not find a channel with id: ${channelId}`);
35
+ }
36
+ return channel;
37
+ }
38
+ exports.resumeUpdateChannelAsync = resumeUpdateChannelAsync;
39
+ class ChannelResume extends EasCommand_1.default {
40
+ async runAsync() {
41
+ const { args, flags: { json, 'non-interactive': nonInteractive }, } = await this.parse(_a);
42
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
43
+ nonInteractive,
44
+ });
45
+ if (json) {
46
+ (0, json_1.enableJsonOutput)();
47
+ }
48
+ const existingChannel = args.name
49
+ ? await ChannelQuery_1.ChannelQuery.viewUpdateChannelAsync(graphqlClient, {
50
+ appId: projectId,
51
+ channelName: args.name,
52
+ })
53
+ : await (0, queries_1.selectChannelOnAppAsync)(graphqlClient, {
54
+ projectId,
55
+ selectionPromptTitle: 'Select a channel to edit',
56
+ paginatedQueryOptions: { json, nonInteractive, offset: 0 },
57
+ });
58
+ const channel = await resumeUpdateChannelAsync(graphqlClient, {
59
+ channelId: existingChannel.id,
60
+ });
61
+ if (json) {
62
+ (0, json_1.printJsonOnlyOutput)(channel);
63
+ }
64
+ else {
65
+ log_1.default.withTick((0, chalk_1.default) `Channel {bold ${channel.name}} is now active.\n`);
66
+ log_1.default.addNewLineIfNone();
67
+ log_1.default.log((0, chalk_1.default) `Users with builds on channel {bold ${channel.name}} will now receive updates.`);
68
+ }
69
+ }
70
+ }
71
+ _a = ChannelResume;
72
+ ChannelResume.description = 'resume a channel to start sending updates';
73
+ ChannelResume.args = [
74
+ {
75
+ name: 'name',
76
+ required: false,
77
+ description: 'Name of the channel to edit',
78
+ },
79
+ ];
80
+ ChannelResume.flags = {
81
+ branch: core_1.Flags.string({
82
+ description: 'Name of the branch to point to',
83
+ }),
84
+ ...flags_1.EasNonInteractiveAndJsonFlags,
85
+ };
86
+ ChannelResume.contextDefinition = {
87
+ ..._a.ContextOptions.ProjectId,
88
+ ..._a.ContextOptions.LoggedIn,
89
+ };
90
+ exports.default = ChannelResume;
@@ -23,6 +23,7 @@ class ChannelRollout extends EasCommand_1.default {
23
23
  const argsAndFlags = this.sanitizeArgsAndFlags({ ...flags, ...args });
24
24
  const { privateProjectConfig: { exp, projectId, projectDir }, vcsClient, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
25
25
  nonInteractive: argsAndFlags.nonInteractive,
26
+ withServerSideEnvironment: null,
26
27
  });
27
28
  if (argsAndFlags.json) {
28
29
  (0, json_1.enableJsonOutput)();
@@ -14,7 +14,7 @@ export default class ChannelView extends EasCommand {
14
14
  };
15
15
  static contextDefinition: {
16
16
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
17
- privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
17
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
18
18
  };
19
19
  runAsync(): Promise<void>;
20
20
  }
@@ -13,7 +13,7 @@ class ChannelView extends EasCommand_1.default {
13
13
  let { args: { name: channelName }, flags, } = await this.parse(_a);
14
14
  const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
15
15
  const { json: jsonFlag, 'non-interactive': nonInteractive } = flags;
16
- const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
16
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
17
17
  nonInteractive,
18
18
  });
19
19
  if (jsonFlag) {
@@ -57,7 +57,7 @@ ChannelView.flags = {
57
57
  ...pagination_1.EasPaginatedQueryFlags,
58
58
  };
59
59
  ChannelView.contextDefinition = {
60
- ..._a.ContextOptions.ProjectConfig,
60
+ ..._a.ContextOptions.ProjectId,
61
61
  ..._a.ContextOptions.LoggedIn,
62
62
  };
63
63
  exports.default = ChannelView;
@@ -10,7 +10,7 @@ export default class Config extends EasCommand {
10
10
  'eas-json-only': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
11
  };
12
12
  static contextDefinition: {
13
- sessionManager: import("../commandUtils/context/SessionManagementContextField").default;
13
+ getDynamicLoggedInAsync: import("../commandUtils/context/DynamicLoggedInContextField").default;
14
14
  projectDir: import("../commandUtils/context/ProjectDirContextField").default;
15
15
  getDynamicPublicProjectConfigAsync: import("../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
16
16
  getDynamicPrivateProjectConfigAsync: import("../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
@@ -9,7 +9,6 @@ const core_1 = require("@oclif/core");
9
9
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
10
10
  const evaluateConfigWithEnvVarsAsync_1 = require("../build/evaluateConfigWithEnvVarsAsync");
11
11
  const EasCommand_1 = tslib_1.__importDefault(require("../commandUtils/EasCommand"));
12
- const createGraphqlClient_1 = require("../commandUtils/context/contextUtils/createGraphqlClient");
13
12
  const flags_1 = require("../commandUtils/flags");
14
13
  const AppPlatform_1 = require("../graphql/types/AppPlatform");
15
14
  const log_1 = tslib_1.__importDefault(require("../log"));
@@ -23,8 +22,9 @@ class Config extends EasCommand_1.default {
23
22
  (0, json_1.enableJsonOutput)();
24
23
  }
25
24
  const { platform: maybePlatform, profile: maybeProfile, 'non-interactive': nonInteractive, } = flags;
26
- const { getDynamicPublicProjectConfigAsync, projectDir, sessionManager } = await this.getContextAsync(_a, {
25
+ const { getDynamicPublicProjectConfigAsync, projectDir, getDynamicLoggedInAsync } = await this.getContextAsync(_a, {
27
26
  nonInteractive,
27
+ withServerSideEnvironment: null,
28
28
  });
29
29
  const accessor = eas_json_1.EasJsonAccessor.fromProjectPath(projectDir);
30
30
  const profileName = maybeProfile ??
@@ -57,10 +57,7 @@ class Config extends EasCommand_1.default {
57
57
  }
58
58
  }
59
59
  else {
60
- const { authenticationInfo } = await sessionManager.ensureLoggedInAsync({
61
- nonInteractive,
62
- });
63
- const graphqlClient = (0, createGraphqlClient_1.createGraphqlClient)(authenticationInfo);
60
+ const { graphqlClient } = await getDynamicLoggedInAsync();
64
61
  const { exp: appConfig } = await (0, evaluateConfigWithEnvVarsAsync_1.evaluateConfigWithEnvVarsAsync)({
65
62
  buildProfile: profile,
66
63
  buildProfileName: profileName,
@@ -105,6 +102,6 @@ Config.flags = {
105
102
  Config.contextDefinition = {
106
103
  ..._a.ContextOptions.DynamicProjectConfig,
107
104
  ..._a.ContextOptions.ProjectDir,
108
- ..._a.ContextOptions.SessionManagment,
105
+ ..._a.ContextOptions.DynamicLoggedIn,
109
106
  };
110
107
  exports.default = Config;
@@ -13,6 +13,7 @@ class InitializeBuildCredentials extends EasCommand_1.default {
13
13
  const { flags } = await this.parse(_a);
14
14
  const { loggedIn: { actor, graphqlClient }, privateProjectConfig, getDynamicPrivateProjectConfigAsync, analytics, vcsClient, } = await this.getContextAsync(_a, {
15
15
  nonInteractive: false,
16
+ withServerSideEnvironment: null,
16
17
  });
17
18
  const platform = await (0, platform_1.selectPlatformAsync)(flags.platform);
18
19
  const buildProfile = flags.profile ??
@@ -9,7 +9,7 @@ export default class Credentials extends EasCommand {
9
9
  analytics: import("../../commandUtils/context/AnalyticsContextField").default;
10
10
  getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
11
11
  getDynamicPrivateProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
12
- privateProjectConfig: import("../../commandUtils/context/OptionalPrivateProjectConfigContextField").OptionalPrivateProjectConfigContextField;
12
+ optionalPrivateProjectConfig: import("../../commandUtils/context/OptionalPrivateProjectConfigContextField").OptionalPrivateProjectConfigContextField;
13
13
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
14
14
  };
15
15
  runAsync(): Promise<void>;
@@ -8,8 +8,9 @@ const SelectPlatform_1 = require("../../credentials/manager/SelectPlatform");
8
8
  class Credentials extends EasCommand_1.default {
9
9
  async runAsync() {
10
10
  const { flags } = await this.parse(_a);
11
- const { loggedIn: { actor, graphqlClient }, privateProjectConfig, getDynamicPrivateProjectConfigAsync, analytics, vcsClient, } = await this.getContextAsync(_a, {
11
+ const { loggedIn: { actor, graphqlClient }, optionalPrivateProjectConfig: privateProjectConfig, getDynamicPrivateProjectConfigAsync, analytics, vcsClient, } = await this.getContextAsync(_a, {
12
12
  nonInteractive: false,
13
+ withServerSideEnvironment: null,
13
14
  });
14
15
  await new SelectPlatform_1.SelectPlatform(actor, graphqlClient, vcsClient, analytics, privateProjectConfig ?? null, getDynamicPrivateProjectConfigAsync, flags.platform).runAsync();
15
16
  }
@@ -2,7 +2,7 @@ import EasCommand from '../../commandUtils/EasCommand';
2
2
  export default class DeviceCreate extends EasCommand {
3
3
  static description: string;
4
4
  static contextDefinition: {
5
- privateProjectConfig: import("../../commandUtils/context/OptionalPrivateProjectConfigContextField").OptionalPrivateProjectConfigContextField;
5
+ optionalPrivateProjectConfig: import("../../commandUtils/context/OptionalPrivateProjectConfigContextField").OptionalPrivateProjectConfigContextField;
6
6
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
7
7
  };
8
8
  runAsync(): Promise<void>;
@@ -9,8 +9,9 @@ const manager_1 = tslib_1.__importDefault(require("../../devices/manager"));
9
9
  class DeviceCreate extends EasCommand_1.default {
10
10
  async runAsync() {
11
11
  // this command is interactive by design
12
- const { loggedIn: { actor, graphqlClient }, privateProjectConfig, } = await this.getContextAsync(_a, {
12
+ const { loggedIn: { actor, graphqlClient }, optionalPrivateProjectConfig: privateProjectConfig, } = await this.getContextAsync(_a, {
13
13
  nonInteractive: false,
14
+ withServerSideEnvironment: null,
14
15
  });
15
16
  const ctx = await (0, context_1.createContextAsync)({
16
17
  appStore: new AppStoreApi_1.default(),
@@ -13,7 +13,7 @@ export default class DeviceDelete extends EasCommand {
13
13
  };
14
14
  static contextDefinition: {
15
15
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
16
- privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
16
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
17
17
  };
18
18
  runAsync(): Promise<void>;
19
19
  shouldDisableDeviceOnAppleAsync({ nonInteractive, }: PaginatedQueryOptions): Promise<boolean>;
@@ -23,7 +23,7 @@ class DeviceDelete extends EasCommand_1.default {
23
23
  const { flags } = await this.parse(_a);
24
24
  const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
25
25
  let { 'apple-team-id': appleTeamIdentifier, udid } = flags;
26
- const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
26
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
27
27
  nonInteractive: paginatedQueryOptions.nonInteractive,
28
28
  });
29
29
  const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
@@ -131,7 +131,7 @@ DeviceDelete.flags = {
131
131
  ...flags_1.EasNonInteractiveAndJsonFlags,
132
132
  };
133
133
  DeviceDelete.contextDefinition = {
134
- ..._a.ContextOptions.ProjectConfig,
134
+ ..._a.ContextOptions.ProjectId,
135
135
  ..._a.ContextOptions.LoggedIn,
136
136
  };
137
137
  exports.default = DeviceDelete;
@@ -10,7 +10,7 @@ export default class BuildList extends EasCommand {
10
10
  };
11
11
  static contextDefinition: {
12
12
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
13
- privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
13
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
14
14
  };
15
15
  runAsync(): Promise<void>;
16
16
  }
@@ -14,7 +14,7 @@ class BuildList extends EasCommand_1.default {
14
14
  async runAsync() {
15
15
  const { flags } = await this.parse(_a);
16
16
  const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
17
- const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
17
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
18
18
  nonInteractive: paginatedQueryOptions.nonInteractive,
19
19
  });
20
20
  let appleTeamIdentifier = flags['apple-team-id'];
@@ -56,7 +56,7 @@ BuildList.flags = {
56
56
  ...flags_1.EasNonInteractiveAndJsonFlags,
57
57
  };
58
58
  BuildList.contextDefinition = {
59
- ..._a.ContextOptions.ProjectConfig,
59
+ ..._a.ContextOptions.ProjectId,
60
60
  ..._a.ContextOptions.LoggedIn,
61
61
  };
62
62
  exports.default = BuildList;
@@ -14,7 +14,7 @@ export default class DeviceRename extends EasCommand {
14
14
  };
15
15
  static contextDefinition: {
16
16
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
17
- privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
17
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
18
18
  };
19
19
  runAsync(): Promise<void>;
20
20
  promptForNewDeviceNameAsync(initial: Maybe<string> | undefined): Promise<string | undefined>;
@@ -23,7 +23,7 @@ class DeviceRename extends EasCommand_1.default {
23
23
  const { flags } = await this.parse(_a);
24
24
  const paginatedQueryOptions = (0, pagination_1.getPaginatedQueryOptions)(flags);
25
25
  let { 'apple-team-id': appleTeamIdentifier, udid, name } = flags;
26
- const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
26
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
27
27
  nonInteractive: paginatedQueryOptions.nonInteractive,
28
28
  });
29
29
  const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
@@ -121,7 +121,7 @@ DeviceRename.flags = {
121
121
  ...flags_1.EasNonInteractiveAndJsonFlags,
122
122
  };
123
123
  DeviceRename.contextDefinition = {
124
- ..._a.ContextOptions.ProjectConfig,
124
+ ..._a.ContextOptions.ProjectId,
125
125
  ..._a.ContextOptions.LoggedIn,
126
126
  };
127
127
  exports.default = DeviceRename;
@@ -6,7 +6,7 @@ export default class DeviceView extends EasCommand {
6
6
  }[];
7
7
  static contextDefinition: {
8
8
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
9
- privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
9
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
10
10
  };
11
11
  runAsync(): Promise<void>;
12
12
  }
@@ -22,7 +22,7 @@ If you are not sure what is the UDID of the device you are looking for, run:
22
22
  `);
23
23
  throw new Error('Device UDID is missing');
24
24
  }
25
- const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
25
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
26
26
  nonInteractive: true,
27
27
  });
28
28
  const account = await (0, projectUtils_1.getOwnerAccountForProjectIdAsync)(graphqlClient, projectId);
@@ -47,7 +47,7 @@ _a = DeviceView;
47
47
  DeviceView.description = 'view a device for your project';
48
48
  DeviceView.args = [{ name: 'UDID' }];
49
49
  DeviceView.contextDefinition = {
50
- ..._a.ContextOptions.ProjectConfig,
50
+ ..._a.ContextOptions.ProjectId,
51
51
  ..._a.ContextOptions.LoggedIn,
52
52
  };
53
53
  exports.default = DeviceView;
@@ -17,7 +17,7 @@ export default class EnvironmentVariableCreate extends EasCommand {
17
17
  static contextDefinition: {
18
18
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
19
19
  analytics: import("../../commandUtils/context/AnalyticsContextField").default;
20
- privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
20
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
21
21
  };
22
22
  runAsync(): Promise<void>;
23
23
  private promptForOverwriteAsync;
@@ -20,8 +20,8 @@ class EnvironmentVariableCreate extends EasCommand_1.default {
20
20
  async runAsync() {
21
21
  const { flags } = await this.parse(_a);
22
22
  const validatedFlags = this.validateFlags(flags);
23
- const { name, value, scope, 'non-interactive': nonInteractive, environment: environments, visibility, link, force, type, } = await this.promptForMissingFlagsAsync(validatedFlags);
24
- const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
23
+ const { name, value, scope, 'non-interactive': nonInteractive, environment: environments, visibility, link, force, type, fileName, } = await this.promptForMissingFlagsAsync(validatedFlags);
24
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
25
25
  nonInteractive,
26
26
  });
27
27
  const [projectDisplayName, ownerAccount] = await Promise.all([
@@ -66,6 +66,7 @@ class EnvironmentVariableCreate extends EasCommand_1.default {
66
66
  visibility,
67
67
  environments,
68
68
  type,
69
+ fileName,
69
70
  })
70
71
  : await EnvironmentVariableMutation_1.EnvironmentVariableMutation.createForAppAsync(graphqlClient, {
71
72
  name,
@@ -73,6 +74,7 @@ class EnvironmentVariableCreate extends EasCommand_1.default {
73
74
  environments,
74
75
  visibility,
75
76
  type: type ?? generated_1.EnvironmentSecretType.String,
77
+ fileName,
76
78
  }, projectId);
77
79
  if (!variable) {
78
80
  throw new Error(`Could not create variable with name ${name} on project ${projectDisplayName}`);
@@ -163,11 +165,13 @@ class EnvironmentVariableCreate extends EasCommand_1.default {
163
165
  });
164
166
  }
165
167
  let environmentFilePath;
168
+ let fileName;
166
169
  if (newType === generated_1.EnvironmentSecretType.FileBase64) {
167
170
  environmentFilePath = path_1.default.resolve(value);
168
171
  if (!(await fs_extra_1.default.pathExists(environmentFilePath))) {
169
172
  throw new Error(`File "${value}" does not exist`);
170
173
  }
174
+ fileName = path_1.default.basename(environmentFilePath);
171
175
  }
172
176
  value = environmentFilePath ? await fs_extra_1.default.readFile(environmentFilePath, 'base64') : value;
173
177
  if (!environment) {
@@ -187,6 +191,7 @@ class EnvironmentVariableCreate extends EasCommand_1.default {
187
191
  scope: rest.scope ?? generated_1.EnvironmentVariableScope.Project,
188
192
  'non-interactive': nonInteractive,
189
193
  type: newType,
194
+ fileName,
190
195
  ...rest,
191
196
  };
192
197
  }
@@ -230,7 +235,7 @@ EnvironmentVariableCreate.flags = {
230
235
  ...flags_1.EASNonInteractiveFlag,
231
236
  };
232
237
  EnvironmentVariableCreate.contextDefinition = {
233
- ..._a.ContextOptions.ProjectConfig,
238
+ ..._a.ContextOptions.ProjectId,
234
239
  ..._a.ContextOptions.Analytics,
235
240
  ..._a.ContextOptions.LoggedIn,
236
241
  };
@@ -11,7 +11,7 @@ export default class EnvironmentVariableDelete extends EasCommand {
11
11
  };
12
12
  static contextDefinition: {
13
13
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
14
- privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
14
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
15
15
  };
16
16
  runAsync(): Promise<void>;
17
17
  private validateFlags;
@@ -17,7 +17,7 @@ class EnvironmentVariableDelete extends EasCommand_1.default {
17
17
  async runAsync() {
18
18
  const { flags } = await this.parse(_a);
19
19
  const { 'variable-name': name, 'variable-environment': environment, 'non-interactive': nonInteractive, scope, } = this.validateFlags(flags);
20
- const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
20
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
21
21
  nonInteractive,
22
22
  });
23
23
  const variables = scope === generated_1.EnvironmentVariableScope.Project
@@ -100,7 +100,7 @@ EnvironmentVariableDelete.flags = {
100
100
  ...flags_1.EASNonInteractiveFlag,
101
101
  };
102
102
  EnvironmentVariableDelete.contextDefinition = {
103
- ..._a.ContextOptions.ProjectConfig,
103
+ ..._a.ContextOptions.ProjectId,
104
104
  ..._a.ContextOptions.LoggedIn,
105
105
  };
106
106
  exports.default = EnvironmentVariableDelete;
@@ -5,7 +5,7 @@ export default class EnvExec extends EasCommand {
5
5
  static hidden: boolean;
6
6
  static contextDefinition: {
7
7
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
8
- privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
8
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
9
9
  };
10
10
  static flags: {
11
11
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -13,7 +13,7 @@ class EnvExec extends EasCommand_1.default {
13
13
  async runAsync() {
14
14
  const { flags, args: { BASH_COMMAND: command }, } = await this.parse(_a);
15
15
  const parsedFlags = this.sanitizeFlags(flags);
16
- const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
16
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
17
17
  nonInteractive: parsedFlags.nonInteractive,
18
18
  });
19
19
  const environment = parsedFlags.environment ??
@@ -108,7 +108,7 @@ _a = EnvExec;
108
108
  EnvExec.description = 'execute a bash command with environment variables from the selected environment';
109
109
  EnvExec.hidden = true;
110
110
  EnvExec.contextDefinition = {
111
- ..._a.ContextOptions.ProjectConfig,
111
+ ..._a.ContextOptions.ProjectId,
112
112
  ..._a.ContextOptions.LoggedIn,
113
113
  };
114
114
  EnvExec.flags = {
@@ -5,7 +5,7 @@ export default class EnvironmentVariableGet extends EasCommand {
5
5
  static hidden: boolean;
6
6
  static contextDefinition: {
7
7
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
8
- privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
8
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
9
9
  };
10
10
  static flags: {
11
11
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -15,7 +15,7 @@ class EnvironmentVariableGet extends EasCommand_1.default {
15
15
  async runAsync() {
16
16
  const { flags } = await this.parse(_a);
17
17
  let { 'variable-environment': environment, 'variable-name': name, 'non-interactive': nonInteractive, format, scope, } = this.validateFlags(flags);
18
- const { privateProjectConfig: { projectId }, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
18
+ const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(_a, {
19
19
  nonInteractive,
20
20
  });
21
21
  if (!name) {
@@ -72,7 +72,7 @@ _a = EnvironmentVariableGet;
72
72
  EnvironmentVariableGet.description = 'get environment variable';
73
73
  EnvironmentVariableGet.hidden = true;
74
74
  EnvironmentVariableGet.contextDefinition = {
75
- ..._a.ContextOptions.ProjectConfig,
75
+ ..._a.ContextOptions.ProjectId,
76
76
  ..._a.ContextOptions.LoggedIn,
77
77
  };
78
78
  EnvironmentVariableGet.flags = {
@@ -11,7 +11,7 @@ export default class EnvironmentVariableLink extends EasCommand {
11
11
  };
12
12
  static contextDefinition: {
13
13
  loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
14
- privateProjectConfig: import("../../commandUtils/context/PrivateProjectConfigContextField").PrivateProjectConfigContextField;
14
+ projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
15
15
  };
16
16
  runAsync(): Promise<void>;
17
17
  }