eas-cli 16.21.0 → 16.23.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.
Files changed (56) hide show
  1. package/README.md +210 -209
  2. package/build/build/android/graphql.js +1 -2
  3. package/build/build/evaluateConfigWithEnvVarsAsync.js +5 -11
  4. package/build/build/ios/graphql.js +1 -2
  5. package/build/build/utils/environment.d.ts +1 -4
  6. package/build/build/utils/environment.js +7 -24
  7. package/build/commandUtils/EasCommand.d.ts +1 -2
  8. package/build/commandUtils/context/ContextField.d.ts +1 -2
  9. package/build/commandUtils/context/contextUtils/loadServerSideEnvironmentVariablesAsync.d.ts +1 -2
  10. package/build/commandUtils/context/contextUtils/loadServerSideEnvironmentVariablesAsync.js +3 -8
  11. package/build/commandUtils/flags.d.ts +3 -5
  12. package/build/commandUtils/flags.js +8 -22
  13. package/build/commandUtils/workflow/buildProfileUtils.d.ts +36 -0
  14. package/build/commandUtils/workflow/buildProfileUtils.js +210 -0
  15. package/build/commandUtils/workflow/creation.d.ts +20 -0
  16. package/build/commandUtils/workflow/creation.js +462 -0
  17. package/build/commandUtils/workflow/validation.d.ts +4 -0
  18. package/build/commandUtils/workflow/validation.js +8 -4
  19. package/build/commands/build/resign.d.ts +2 -3
  20. package/build/commands/deploy/index.d.ts +1 -2
  21. package/build/commands/env/create.d.ts +1 -2
  22. package/build/commands/env/create.js +12 -14
  23. package/build/commands/env/delete.d.ts +1 -2
  24. package/build/commands/env/delete.js +2 -6
  25. package/build/commands/env/exec.js +6 -7
  26. package/build/commands/env/get.d.ts +1 -2
  27. package/build/commands/env/get.js +4 -6
  28. package/build/commands/env/list.d.ts +1 -2
  29. package/build/commands/env/list.js +8 -6
  30. package/build/commands/env/pull.d.ts +1 -1
  31. package/build/commands/env/pull.js +8 -8
  32. package/build/commands/env/push.d.ts +6 -4
  33. package/build/commands/env/push.js +42 -30
  34. package/build/commands/env/update.d.ts +2 -3
  35. package/build/commands/env/update.js +7 -8
  36. package/build/commands/fingerprint/compare.d.ts +1 -2
  37. package/build/commands/fingerprint/compare.js +1 -1
  38. package/build/commands/fingerprint/generate.d.ts +1 -2
  39. package/build/commands/fingerprint/generate.js +1 -1
  40. package/build/commands/update/configure.d.ts +1 -1
  41. package/build/commands/update/configure.js +1 -1
  42. package/build/commands/update/index.d.ts +1 -2
  43. package/build/commands/update/index.js +1 -1
  44. package/build/commands/workflow/create.d.ts +4 -3
  45. package/build/commands/workflow/create.js +130 -56
  46. package/build/graphql/generated.d.ts +44 -0
  47. package/build/graphql/queries/EnvironmentVariablesQuery.d.ts +6 -6
  48. package/build/graphql/queries/EnvironmentVariablesQuery.js +15 -0
  49. package/build/graphql/types/Workflow.js +11 -0
  50. package/build/utils/prompts.d.ts +8 -5
  51. package/build/utils/prompts.js +69 -10
  52. package/build/utils/variableUtils.d.ts +1 -3
  53. package/build/utils/variableUtils.js +1 -6
  54. package/build/worker/assets.d.ts +1 -2
  55. package/oclif.manifest.json +43 -114
  56. package/package.json +4 -4
@@ -8,7 +8,6 @@ const flags_1 = require("../../commandUtils/flags");
8
8
  const EnvironmentVariablesQuery_1 = require("../../graphql/queries/EnvironmentVariablesQuery");
9
9
  const log_1 = tslib_1.__importDefault(require("../../log"));
10
10
  const prompts_1 = require("../../utils/prompts");
11
- const variableUtils_1 = require("../../utils/variableUtils");
12
11
  class EnvExec extends EasCommand_1.default {
13
12
  static description = 'execute a command with environment variables from the selected environment';
14
13
  static contextDefinition = {
@@ -22,7 +21,7 @@ class EnvExec extends EasCommand_1.default {
22
21
  {
23
22
  name: 'environment',
24
23
  required: true,
25
- description: "Environment to execute the command in. One of 'production', 'preview', or 'development'.",
24
+ description: "Environment to execute the command in. Default environments are 'production', 'preview', and 'development'.",
26
25
  },
27
26
  {
28
27
  name: 'bash_command',
@@ -39,7 +38,11 @@ class EnvExec extends EasCommand_1.default {
39
38
  });
40
39
  this.isNonInteractive = parsedFlags.nonInteractive;
41
40
  const environment = parsedFlags.environment ??
42
- (await (0, prompts_1.promptVariableEnvironmentAsync)({ nonInteractive: parsedFlags.nonInteractive }));
41
+ (await (0, prompts_1.promptVariableEnvironmentAsync)({
42
+ nonInteractive: parsedFlags.nonInteractive,
43
+ graphqlClient,
44
+ projectId,
45
+ }));
43
46
  const environmentVariables = await this.loadEnvironmentVariablesAsync({
44
47
  graphqlClient,
45
48
  projectId,
@@ -63,10 +66,6 @@ class EnvExec extends EasCommand_1.default {
63
66
  if (rawFlags['non-interactive'] && (!bash_command || !environment)) {
64
67
  throw new Error("You must specify both environment and bash command when running in non-interactive mode. Run command as `eas env:exec ENVIRONMENT 'bash command'`.");
65
68
  }
66
- environment = environment?.toLowerCase();
67
- if (!(0, variableUtils_1.isEnvironment)(environment)) {
68
- throw new Error("Invalid environment. Use one of 'production', 'preview', or 'development'.");
69
- }
70
69
  const firstChar = bash_command[0];
71
70
  const lastChar = bash_command[bash_command.length - 1];
72
71
  const cleanCommand = (firstChar === '"' && lastChar === '"') || (firstChar === "'" && lastChar === "'")
@@ -1,4 +1,3 @@
1
- import { EnvironmentVariableEnvironment } from '../../build/utils/environment';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  import { EASEnvironmentVariableScopeFlagValue } from '../../commandUtils/flags';
4
3
  export default class EnvGet extends EasCommand {
@@ -17,7 +16,7 @@ export default class EnvGet extends EasCommand {
17
16
  scope: import("@oclif/core/lib/interfaces").OptionFlag<EASEnvironmentVariableScopeFlagValue>;
18
17
  format: import("@oclif/core/lib/interfaces").OptionFlag<string>;
19
18
  'variable-name': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
20
- 'variable-environment': import("@oclif/core/lib/interfaces").OptionFlag<EnvironmentVariableEnvironment | undefined>;
19
+ 'variable-environment': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
21
20
  };
22
21
  runAsync(): Promise<void>;
23
22
  private sanitizeInputs;
@@ -19,7 +19,7 @@ class EnvGet extends EasCommand_1.default {
19
19
  static args = [
20
20
  {
21
21
  name: 'environment',
22
- description: "Current environment of the variable. One of 'production', 'preview', or 'development'.",
22
+ description: "Current environment of the variable. Default environments are 'production', 'preview', and 'development'.",
23
23
  required: false,
24
24
  },
25
25
  ];
@@ -27,7 +27,7 @@ class EnvGet extends EasCommand_1.default {
27
27
  'variable-name': core_1.Flags.string({
28
28
  description: 'Name of the variable',
29
29
  }),
30
- 'variable-environment': core_1.Flags.enum({
30
+ 'variable-environment': core_1.Flags.string({
31
31
  ...flags_1.EasEnvironmentFlagParameters,
32
32
  description: 'Current environment of the variable',
33
33
  }),
@@ -48,6 +48,8 @@ class EnvGet extends EasCommand_1.default {
48
48
  environment = await (0, prompts_1.promptVariableEnvironmentAsync)({
49
49
  nonInteractive,
50
50
  multiple: false,
51
+ graphqlClient,
52
+ projectId,
51
53
  });
52
54
  }
53
55
  const variables = await getVariablesAsync(graphqlClient, scope, projectId, name, environment);
@@ -95,10 +97,6 @@ class EnvGet extends EasCommand_1.default {
95
97
  ? generated_1.EnvironmentVariableScope.Shared
96
98
  : generated_1.EnvironmentVariableScope.Project;
97
99
  if (environment) {
98
- environment = environment.toLowerCase();
99
- if (!(0, variableUtils_1.isEnvironment)(environment)) {
100
- throw new Error("Invalid environment. Use one of 'production', 'preview', or 'development'.");
101
- }
102
100
  return {
103
101
  ...flags,
104
102
  'variable-environment': environment,
@@ -1,4 +1,3 @@
1
- import { EnvironmentVariableEnvironment } from '../../build/utils/environment';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  import { EASEnvironmentVariableScopeFlagValue } from '../../commandUtils/flags';
4
3
  export default class EnvList extends EasCommand {
@@ -10,7 +9,7 @@ export default class EnvList extends EasCommand {
10
9
  static flags: {
11
10
  scope: import("@oclif/core/lib/interfaces").OptionFlag<EASEnvironmentVariableScopeFlagValue>;
12
11
  format: import("@oclif/core/lib/interfaces").OptionFlag<string>;
13
- environment: import("@oclif/core/lib/interfaces").OptionFlag<EnvironmentVariableEnvironment[] | undefined>;
12
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined>;
14
13
  'include-sensitive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
15
14
  'include-file-content': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
16
15
  };
@@ -59,7 +59,7 @@ class EnvList extends EasCommand_1.default {
59
59
  static args = [
60
60
  {
61
61
  name: 'environment',
62
- description: "Environment to list the variables from. One of 'production', 'preview', or 'development'.",
62
+ description: "Environment to list the variables from. Default environments are 'production', 'preview', and 'development'.",
63
63
  required: false,
64
64
  },
65
65
  ];
@@ -70,7 +70,12 @@ class EnvList extends EasCommand_1.default {
70
70
  nonInteractive: true,
71
71
  });
72
72
  if (!environments) {
73
- environments = await (0, prompts_1.promptVariableEnvironmentAsync)({ nonInteractive, multiple: true });
73
+ environments = await (0, prompts_1.promptVariableEnvironmentAsync)({
74
+ nonInteractive,
75
+ multiple: true,
76
+ graphqlClient,
77
+ projectId,
78
+ });
74
79
  }
75
80
  await (0, variableUtils_1.performForEnvironmentsAsync)(environments, async (environment) => {
76
81
  const variables = await getVariablesForScopeAsync(graphqlClient, {
@@ -105,13 +110,10 @@ class EnvList extends EasCommand_1.default {
105
110
  });
106
111
  }
107
112
  sanitizeInputs(flags, { environment }) {
108
- if (environment && !(0, variableUtils_1.isEnvironment)(environment.toLowerCase())) {
109
- throw new Error("Invalid environment. Use one of 'production', 'preview', or 'development'.");
110
- }
111
113
  const environments = flags.environment
112
114
  ? flags.environment
113
115
  : environment
114
- ? [environment.toLowerCase()]
116
+ ? [environment]
115
117
  : undefined;
116
118
  return {
117
119
  ...flags,
@@ -13,7 +13,7 @@ export default class EnvPull extends EasCommand {
13
13
  }[];
14
14
  static flags: {
15
15
  path: import("@oclif/core/lib/interfaces").OptionFlag<string>;
16
- environment: import("@oclif/core/lib/interfaces").OptionFlag<import("../../build/utils/environment").EnvironmentVariableEnvironment | undefined>;
16
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
17
17
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
18
  };
19
19
  runAsync(): Promise<void>;
@@ -12,7 +12,6 @@ const EnvironmentVariablesQuery_1 = require("../../graphql/queries/EnvironmentVa
12
12
  const log_1 = tslib_1.__importDefault(require("../../log"));
13
13
  const prompts_1 = require("../../prompts");
14
14
  const prompts_2 = require("../../utils/prompts");
15
- const variableUtils_1 = require("../../utils/variableUtils");
16
15
  class EnvPull extends EasCommand_1.default {
17
16
  static description = 'pull environment variables for the selected environment to .env file';
18
17
  static contextDefinition = {
@@ -23,7 +22,7 @@ class EnvPull extends EasCommand_1.default {
23
22
  static args = [
24
23
  {
25
24
  name: 'environment',
26
- description: "Environment to pull variables from. One of 'production', 'preview', or 'development'.",
25
+ description: "Environment to pull variables from. Default environments are 'production', 'preview', and 'development'.",
27
26
  required: false,
28
27
  },
29
28
  ];
@@ -38,15 +37,16 @@ class EnvPull extends EasCommand_1.default {
38
37
  async runAsync() {
39
38
  let { args: { environment: argEnvironment }, flags: { environment: flagEnvironment, path: targetPath, 'non-interactive': nonInteractive }, } = await this.parse(EnvPull);
40
39
  let environment = flagEnvironment?.toLowerCase() ?? argEnvironment?.toLowerCase();
41
- if (!environment) {
42
- environment = await (0, prompts_2.promptVariableEnvironmentAsync)({ nonInteractive });
43
- }
44
- if (!(0, variableUtils_1.isEnvironment)(environment)) {
45
- throw new Error("Invalid environment. Use one of 'production', 'preview', or 'development'.");
46
- }
47
40
  const { projectId, loggedIn: { graphqlClient }, projectDir, } = await this.getContextAsync(EnvPull, {
48
41
  nonInteractive,
49
42
  });
43
+ if (!environment) {
44
+ environment = await (0, prompts_2.promptVariableEnvironmentAsync)({
45
+ nonInteractive,
46
+ graphqlClient,
47
+ projectId,
48
+ });
49
+ }
50
50
  targetPath = targetPath ?? '.env.local';
51
51
  const environmentVariables = await EnvironmentVariablesQuery_1.EnvironmentVariablesQuery.byAppIdWithSensitiveAsync(graphqlClient, {
52
52
  appId: projectId,
@@ -1,4 +1,3 @@
1
- import { EnvironmentVariableEnvironment } from '../../build/utils/environment';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  export default class EnvPush extends EasCommand {
4
3
  static description: string;
@@ -8,7 +7,8 @@ export default class EnvPush extends EasCommand {
8
7
  };
9
8
  static flags: {
10
9
  path: import("@oclif/core/lib/interfaces").OptionFlag<string>;
11
- environment: import("@oclif/core/lib/interfaces").OptionFlag<EnvironmentVariableEnvironment[] | undefined>;
10
+ force: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined>;
12
12
  };
13
13
  static args: {
14
14
  name: string;
@@ -18,10 +18,12 @@ export default class EnvPush extends EasCommand {
18
18
  runAsync(): Promise<void>;
19
19
  parseFlagsAndArgs(flags: {
20
20
  path: string;
21
- environment: EnvironmentVariableEnvironment[] | undefined;
21
+ environment: string[] | undefined;
22
+ force: boolean;
22
23
  }, { environment }: Record<string, string>): {
23
- environment?: EnvironmentVariableEnvironment[];
24
+ environment?: string[];
24
25
  path: string;
26
+ force: boolean;
25
27
  };
26
28
  private parseEnvFileAsync;
27
29
  }
@@ -13,7 +13,6 @@ const EnvironmentVariablesQuery_1 = require("../../graphql/queries/EnvironmentVa
13
13
  const log_1 = tslib_1.__importDefault(require("../../log"));
14
14
  const prompts_1 = require("../../prompts");
15
15
  const prompts_2 = require("../../utils/prompts");
16
- const variableUtils_1 = require("../../utils/variableUtils");
17
16
  class EnvPush extends EasCommand_1.default {
18
17
  static description = 'push environment variables from .env file to the selected environment';
19
18
  static contextDefinition = {
@@ -26,17 +25,21 @@ class EnvPush extends EasCommand_1.default {
26
25
  description: 'Path to the input `.env` file',
27
26
  default: '.env.local',
28
27
  }),
28
+ force: core_1.Flags.boolean({
29
+ description: 'Skip confirmation and automatically override existing variables',
30
+ default: false,
31
+ }),
29
32
  };
30
33
  static args = [
31
34
  {
32
35
  name: 'environment',
33
- description: "Environment to push variables to. One of 'production', 'preview', or 'development'.",
36
+ description: "Environment to push variables to. Default environments are 'production', 'preview', and 'development'.",
34
37
  required: false,
35
38
  },
36
39
  ];
37
40
  async runAsync() {
38
41
  const { args, flags } = await this.parse(EnvPush);
39
- let { environment: environments, path: envPath } = this.parseFlagsAndArgs(flags, args);
42
+ let { environment: environments, path: envPath, force } = this.parseFlagsAndArgs(flags, args);
40
43
  const { projectId, loggedIn: { graphqlClient }, } = await this.getContextAsync(EnvPush, {
41
44
  nonInteractive: false,
42
45
  });
@@ -44,6 +47,9 @@ class EnvPush extends EasCommand_1.default {
44
47
  environments = await (0, prompts_2.promptVariableEnvironmentAsync)({
45
48
  nonInteractive: false,
46
49
  multiple: true,
50
+ canEnterCustomEnvironment: true,
51
+ graphqlClient,
52
+ projectId,
47
53
  });
48
54
  }
49
55
  const updateVariables = await this.parseEnvFileAsync(envPath, environments);
@@ -82,32 +88,39 @@ class EnvPush extends EasCommand_1.default {
82
88
  if (existingDifferentVariables.length > 0) {
83
89
  log_1.default.warn(`Some variables already exist in the ${displayedEnvironment} environment.`);
84
90
  const variableNames = existingDifferentVariables.map(variable => variable.name);
85
- const confirmationMessage = variableNames.length > 1
86
- ? `The ${variableNames.join(', ')} environment variables already exist in ${displayedEnvironment} environment. Do you want to override them all?`
87
- : `The ${variableNames[0]} environment variable already exists in ${displayedEnvironment} environment. Do you want to override it?`;
88
- const confirm = await (0, prompts_1.confirmAsync)({
89
- message: confirmationMessage,
90
- });
91
91
  let variablesToOverwrite = [];
92
- if (!confirm && existingDifferentVariables.length === 0) {
93
- throw new Error('No new variables to push.');
94
- }
95
- if (confirm) {
92
+ if (force) {
93
+ // When --force is used, automatically override all existing variables
94
+ log_1.default.log('Using --force flag: automatically overriding existing variables.');
96
95
  variablesToOverwrite = existingDifferentVariables.map(variable => variable.name);
97
96
  }
98
97
  else {
99
- const promptResult = await (0, prompts_1.promptAsync)({
100
- type: 'multiselect',
101
- name: 'variablesToOverwrite',
102
- message: 'Select variables to overwrite:',
103
- // @ts-expect-error property missing from `@types/prompts`
104
- optionsPerPage: 20,
105
- choices: existingDifferentVariables.map(variable => ({
106
- title: `${variable.name}: ${updateVariables[variable.name].value} (was ${variable.value ?? '(secret)'})`,
107
- value: variable.name,
108
- })),
98
+ const confirmationMessage = variableNames.length > 1
99
+ ? `The ${variableNames.join(', ')} environment variables already exist in ${displayedEnvironment} environment. Do you want to override them all?`
100
+ : `The ${variableNames[0]} environment variable already exists in ${displayedEnvironment} environment. Do you want to override it?`;
101
+ const confirm = await (0, prompts_1.confirmAsync)({
102
+ message: confirmationMessage,
109
103
  });
110
- variablesToOverwrite = promptResult.variablesToOverwrite;
104
+ if (!confirm && existingDifferentVariables.length === 0) {
105
+ throw new Error('No new variables to push.');
106
+ }
107
+ if (confirm) {
108
+ variablesToOverwrite = existingDifferentVariables.map(variable => variable.name);
109
+ }
110
+ else {
111
+ const promptResult = await (0, prompts_1.promptAsync)({
112
+ type: 'multiselect',
113
+ name: 'variablesToOverwrite',
114
+ message: 'Select variables to overwrite:',
115
+ // @ts-expect-error property missing from `@types/prompts`
116
+ optionsPerPage: 20,
117
+ choices: existingDifferentVariables.map(variable => ({
118
+ title: `${variable.name}: ${updateVariables[variable.name].value} (was ${variable.value ?? '(secret)'})`,
119
+ value: variable.name,
120
+ })),
121
+ });
122
+ variablesToOverwrite = promptResult.variablesToOverwrite;
123
+ }
111
124
  }
112
125
  for (const existingVariable of existingVariables) {
113
126
  const name = existingVariable.name;
@@ -121,7 +134,7 @@ class EnvPush extends EasCommand_1.default {
121
134
  }
122
135
  // Check if any of the sensitive variables already exist in the environment. Prompt the user to overwrite them.
123
136
  const existingSensitiveVariables = existingVariables.filter(variable => variable.visibility !== generated_1.EnvironmentVariableVisibility.Public);
124
- if (existingSensitiveVariables.length > 0) {
137
+ if (existingSensitiveVariables.length > 0 && !force) {
125
138
  const existingSensitiveVariablesNames = existingSensitiveVariables.map(variable => `- ${variable.name}`);
126
139
  const confirm = await (0, prompts_1.confirmAsync)({
127
140
  message: `You are about to overwrite sensitive variables.\n${existingSensitiveVariablesNames.join('\n')}\n Do you want to continue?`,
@@ -130,6 +143,9 @@ class EnvPush extends EasCommand_1.default {
130
143
  throw new Error('Aborting...');
131
144
  }
132
145
  }
146
+ else if (existingSensitiveVariables.length > 0 && force) {
147
+ log_1.default.log('Using --force flag: automatically overriding sensitive variables.');
148
+ }
133
149
  }
134
150
  const variablesToPush = Object.values(updateVariables);
135
151
  if (variablesToPush.length === 0) {
@@ -140,11 +156,7 @@ class EnvPush extends EasCommand_1.default {
140
156
  log_1.default.log(`Uploaded env file to ${environments.join(', ').toLocaleLowerCase()}.`);
141
157
  }
142
158
  parseFlagsAndArgs(flags, { environment }) {
143
- if (environment && !(0, variableUtils_1.isEnvironment)(environment.toLowerCase())) {
144
- throw new Error("Invalid environment. Use one of 'production', 'preview', or 'development'.");
145
- }
146
- const environments = flags.environment ??
147
- (environment ? [environment.toLowerCase()] : undefined);
159
+ const environments = flags.environment ?? (environment ? [environment] : undefined);
148
160
  return {
149
161
  ...flags,
150
162
  environment: environments,
@@ -1,15 +1,14 @@
1
- import { EnvironmentVariableEnvironment } from '../../build/utils/environment';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  import { EASEnvironmentVariableScopeFlagValue } from '../../commandUtils/flags';
4
3
  export default class EnvUpdate extends EasCommand {
5
4
  static description: string;
6
5
  static flags: {
7
6
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
- environment: import("@oclif/core/lib/interfaces").OptionFlag<EnvironmentVariableEnvironment[] | undefined>;
7
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined>;
9
8
  scope: import("@oclif/core/lib/interfaces").OptionFlag<EASEnvironmentVariableScopeFlagValue>;
10
9
  visibility: import("@oclif/core/lib/interfaces").OptionFlag<"plaintext" | "sensitive" | "secret" | undefined>;
11
10
  'variable-name': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
12
- 'variable-environment': import("@oclif/core/lib/interfaces").OptionFlag<EnvironmentVariableEnvironment | undefined>;
11
+ 'variable-environment': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
13
12
  name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
14
13
  value: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
15
14
  type: import("@oclif/core/lib/interfaces").OptionFlag<"string" | "file" | undefined>;
@@ -22,7 +22,7 @@ class EnvUpdate extends EasCommand_1.default {
22
22
  'variable-name': core_1.Flags.string({
23
23
  description: 'Current name of the variable',
24
24
  }),
25
- 'variable-environment': core_1.Flags.enum({
25
+ 'variable-environment': core_1.Flags.string({
26
26
  ...flags_1.EasEnvironmentFlagParameters,
27
27
  description: 'Current environment of the variable to update',
28
28
  }),
@@ -44,7 +44,7 @@ class EnvUpdate extends EasCommand_1.default {
44
44
  static args = [
45
45
  {
46
46
  name: 'environment',
47
- description: "Current environment of the variable to update. One of 'production', 'preview', or 'development'.",
47
+ description: "Current environment of the variable to update. Default environments are 'production', 'preview', and 'development'.",
48
48
  required: false,
49
49
  },
50
50
  ];
@@ -103,7 +103,7 @@ class EnvUpdate extends EasCommand_1.default {
103
103
  'non-interactive': nonInteractive,
104
104
  type,
105
105
  scope,
106
- });
106
+ }, { graphqlClient, projectId });
107
107
  const variable = await EnvironmentVariableMutation_1.EnvironmentVariableMutation.updateAsync(graphqlClient, {
108
108
  id: selectedVariable.id,
109
109
  name: newName,
@@ -131,10 +131,6 @@ class EnvUpdate extends EasCommand_1.default {
131
131
  ? generated_1.EnvironmentVariableScope.Shared
132
132
  : generated_1.EnvironmentVariableScope.Project;
133
133
  if (environment) {
134
- environment = environment.toLowerCase();
135
- if (!(0, variableUtils_1.isEnvironment)(environment)) {
136
- throw new Error("Invalid environment. Use one of 'production', 'preview', or 'development'.");
137
- }
138
134
  return {
139
135
  ...flags,
140
136
  'variable-environment': environment,
@@ -143,7 +139,7 @@ class EnvUpdate extends EasCommand_1.default {
143
139
  }
144
140
  return { ...flags, scope };
145
141
  }
146
- async promptForMissingFlagsAsync(selectedVariable, { name, value, environment: environments, visibility, 'non-interactive': nonInteractive, type, ...rest }) {
142
+ async promptForMissingFlagsAsync(selectedVariable, { name, value, environment: environments, visibility, 'non-interactive': nonInteractive, type, ...rest }, { graphqlClient, projectId }) {
147
143
  let newType;
148
144
  let newVisibility;
149
145
  let fileName;
@@ -190,7 +186,10 @@ class EnvUpdate extends EasCommand_1.default {
190
186
  environments = await (0, prompts_2.promptVariableEnvironmentAsync)({
191
187
  nonInteractive,
192
188
  multiple: true,
189
+ canEnterCustomEnvironment: true,
193
190
  selectedEnvironments: selectedVariable.environments ?? [],
191
+ graphqlClient,
192
+ projectId,
194
193
  });
195
194
  if (!environments ||
196
195
  environments.length === 0 ||
@@ -1,4 +1,3 @@
1
- import { EnvironmentVariableEnvironment } from '../../build/utils/environment';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  export default class FingerprintCompare extends EasCommand {
4
3
  static description: string;
@@ -15,7 +14,7 @@ export default class FingerprintCompare extends EasCommand {
15
14
  'build-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined>;
16
15
  'update-id': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined>;
17
16
  open: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
- environment: import("@oclif/core/lib/interfaces").OptionFlag<EnvironmentVariableEnvironment | undefined>;
17
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
19
18
  };
20
19
  static contextDefinition: {
21
20
  getServerSideEnvironmentVariablesAsync: import("../../commandUtils/context/ServerSideEnvironmentVariablesContextField").ServerSideEnvironmentVariablesContextField;
@@ -69,7 +69,7 @@ class FingerprintCompare extends EasCommand_1.default {
69
69
  open: core_1.Flags.boolean({
70
70
  description: 'Open the fingerprint comparison in the browser',
71
71
  }),
72
- environment: core_1.Flags.enum({
72
+ environment: core_1.Flags.string({
73
73
  ...flags_1.EasEnvironmentFlagParameters,
74
74
  description: 'If generating a fingerprint from the local directory, use the specified environment.',
75
75
  }),
@@ -1,4 +1,3 @@
1
- import { EnvironmentVariableEnvironment } from '../../build/utils/environment';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  export default class FingerprintGenerate extends EasCommand {
4
3
  static description: string;
@@ -7,7 +6,7 @@ export default class FingerprintGenerate extends EasCommand {
7
6
  static flags: {
8
7
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
8
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
- environment: import("@oclif/core/lib/interfaces").OptionFlag<EnvironmentVariableEnvironment | undefined>;
9
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
11
10
  'build-profile': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
12
11
  platform: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
13
12
  };
@@ -29,7 +29,7 @@ class FingerprintGenerate extends EasCommand_1.default {
29
29
  options: ['android', 'ios'],
30
30
  }),
31
31
  ...flags_1.EASEnvironmentFlag,
32
- environment: core_1.Flags.enum({
32
+ environment: core_1.Flags.string({
33
33
  ...flags_1.EasEnvironmentFlagParameters,
34
34
  exclusive: ['build-profile'],
35
35
  }),
@@ -4,7 +4,7 @@ export default class UpdateConfigure extends EasCommand {
4
4
  static description: string;
5
5
  static flags: {
6
6
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
- environment: import("@oclif/core/lib/interfaces").OptionFlag<import("../../build/utils/environment").EnvironmentVariableEnvironment | null>;
7
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
8
8
  platform: import("@oclif/core/lib/interfaces").OptionFlag<RequestedPlatform>;
9
9
  };
10
10
  static contextDefinition: {
@@ -31,7 +31,7 @@ class UpdateConfigure extends EasCommand_1.default {
31
31
  const { flags } = await this.parse(UpdateConfigure);
32
32
  const { privateProjectConfig: { projectId, exp, projectDir }, vcsClient, } = await this.getContextAsync(UpdateConfigure, {
33
33
  nonInteractive: flags['non-interactive'],
34
- withServerSideEnvironment: flags['environment'],
34
+ withServerSideEnvironment: flags['environment'] ?? null,
35
35
  });
36
36
  log_1.default.log('💡 The following process will configure your project to use EAS Update. These changes only apply to your local project files and you can safely revert them at any time.');
37
37
  await vcsClient.ensureRepoExistsAsync();
@@ -1,4 +1,3 @@
1
- import { EnvironmentVariableEnvironment } from '../../build/utils/environment';
2
1
  import EasCommand from '../../commandUtils/EasCommand';
3
2
  import { RequestedPlatform } from '../../platform';
4
3
  export default class UpdatePublish extends EasCommand {
@@ -6,7 +5,7 @@ export default class UpdatePublish extends EasCommand {
6
5
  static flags: {
7
6
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
7
  'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
- environment: import("@oclif/core/lib/interfaces").OptionFlag<EnvironmentVariableEnvironment | null>;
8
+ environment: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
10
9
  branch: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
11
10
  channel: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
12
11
  message: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined>;
@@ -101,7 +101,7 @@ class UpdatePublish extends EasCommand_1.default {
101
101
  const { auto: autoFlag, platform: requestedPlatform, channelName: channelNameArg, updateMessage: updateMessageArg, inputDir, skipBundler, clearCache, privateKeyPath, json: jsonFlag, nonInteractive, branchName: branchNameArg, emitMetadata, rolloutPercentage, environment, } = this.sanitizeFlags(rawFlags);
102
102
  const { getDynamicPublicProjectConfigAsync, getDynamicPrivateProjectConfigAsync, loggedIn: { graphqlClient }, vcsClient, getServerSideEnvironmentVariablesAsync, } = await this.getContextAsync(UpdatePublish, {
103
103
  nonInteractive,
104
- withServerSideEnvironment: environment,
104
+ withServerSideEnvironment: environment ?? null,
105
105
  });
106
106
  if (jsonFlag) {
107
107
  (0, json_1.enableJsonOutput)();
@@ -7,12 +7,13 @@ export declare class WorkflowCreate extends EasCommand {
7
7
  required: boolean;
8
8
  }[];
9
9
  static flags: {
10
- 'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ 'skip-validation': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
11
  };
12
12
  static contextDefinition: {
13
+ loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
13
14
  projectDir: import("../../commandUtils/context/ProjectDirContextField").default;
15
+ getDynamicPublicProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPublicProjectConfigContextField;
16
+ getDynamicPrivateProjectConfigAsync: import("../../commandUtils/context/DynamicProjectConfigContextField").DynamicPrivateProjectConfigContextField;
14
17
  };
15
18
  runAsync(): Promise<void>;
16
- private ensureWorkflowsDirectoryExistsAsync;
17
- private createWorkflowFileAsync;
18
19
  }