eas-cli 12.5.1 → 12.5.3

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 (45) hide show
  1. package/README.md +66 -62
  2. package/build/build/build.js +4 -4
  3. package/build/commandUtils/flags.d.ts +10 -0
  4. package/build/commandUtils/flags.js +15 -8
  5. package/build/commands/env/create.d.ts +4 -1
  6. package/build/commands/env/create.js +133 -74
  7. package/build/commands/env/delete.d.ts +2 -2
  8. package/build/commands/env/delete.js +37 -26
  9. package/build/commands/env/exec.js +2 -1
  10. package/build/commands/env/get.d.ts +2 -2
  11. package/build/commands/env/get.js +44 -28
  12. package/build/commands/env/link.d.ts +4 -2
  13. package/build/commands/env/link.js +53 -14
  14. package/build/commands/env/list.d.ts +2 -2
  15. package/build/commands/env/list.js +59 -42
  16. package/build/commands/env/pull.js +1 -1
  17. package/build/commands/env/unlink.d.ts +3 -2
  18. package/build/commands/env/unlink.js +48 -21
  19. package/build/commands/env/update.d.ts +6 -2
  20. package/build/commands/env/update.js +134 -70
  21. package/build/commands/update/index.js +0 -1
  22. package/build/commands/worker/deploy.js +31 -11
  23. package/build/graphql/generated.d.ts +103 -15
  24. package/build/graphql/mutations/EnvironmentVariableMutation.d.ts +13 -22
  25. package/build/graphql/mutations/EnvironmentVariableMutation.js +18 -2
  26. package/build/graphql/queries/EnvironmentVariablesQuery.d.ts +24 -11
  27. package/build/graphql/queries/EnvironmentVariablesQuery.js +40 -17
  28. package/build/graphql/types/EnvironmentVariable.js +3 -1
  29. package/build/graphql/types/EnvironmentVariableWithSecret.d.ts +1 -0
  30. package/build/graphql/types/EnvironmentVariableWithSecret.js +18 -0
  31. package/build/prompts.d.ts +1 -0
  32. package/build/prompts.js +2 -0
  33. package/build/update/republish.js +1 -0
  34. package/build/utils/prompts.d.ts +16 -3
  35. package/build/utils/prompts.js +52 -8
  36. package/build/utils/variableUtils.d.ts +6 -0
  37. package/build/utils/variableUtils.js +62 -0
  38. package/build/worker/assets.d.ts +6 -1
  39. package/build/worker/assets.js +1 -2
  40. package/build/worker/upload.d.ts +1 -0
  41. package/build/worker/upload.js +25 -1
  42. package/oclif.manifest.json +98 -41
  43. package/package.json +3 -3
  44. package/build/utils/formatVariable.d.ts +0 -2
  45. package/build/utils/formatVariable.js +0 -16
package/build/prompts.js CHANGED
@@ -32,9 +32,11 @@ async function confirmAsync(question, options) {
32
32
  }
33
33
  exports.confirmAsync = confirmAsync;
34
34
  async function selectAsync(message, choices, config) {
35
+ const initial = config?.initial ? choices.findIndex(({ value }) => value === config.initial) : 0;
35
36
  const { value } = await promptAsync({
36
37
  message,
37
38
  choices,
39
+ initial,
38
40
  name: 'value',
39
41
  type: 'select',
40
42
  warn: config?.warningMessageForDisabledEntries,
@@ -29,6 +29,7 @@ async function republishAsync({ graphqlClient, app, updatesToPublish, targetBran
29
29
  (0, assert_1.default)(updatesToPublish.every(isSameGroup), 'All updates being republished must belong to the same update group');
30
30
  (0, assert_1.default)(updatesToPublish.every(u => u.isRollBackToEmbedded) ||
31
31
  updatesToPublish.every(u => !u.isRollBackToEmbedded), 'All updates must either be roll back to embedded updates or not');
32
+ (0, assert_1.default)(!updatesToPublish.some(u => !!u.rolloutControlUpdate), 'Cannot republish an update that is being rolled-out. Either complete the update rollout and then republish or publish a new rollout update.');
32
33
  const { runtimeVersion } = arbitraryUpdate;
33
34
  // If codesigning was created for the original update, we need to add it to the republish.
34
35
  // If one wishes to not sign the republish or sign with a different key, a normal publish should
@@ -1,9 +1,22 @@
1
- import { EnvironmentVariableEnvironment } from '../graphql/generated';
2
- export declare function promptVariableEnvironmentAsync(nonInteractive: boolean): Promise<EnvironmentVariableEnvironment>;
1
+ import { EnvironmentSecretType, EnvironmentVariableEnvironment, EnvironmentVariableVisibility } from '../graphql/generated';
2
+ export declare function promptVariableTypeAsync(nonInteractive: boolean, initialType?: EnvironmentSecretType): Promise<EnvironmentSecretType>;
3
+ export declare function promptVariableVisibilityAsync(nonInteractive: boolean, selectedVisibility?: EnvironmentVariableVisibility | null): Promise<EnvironmentVariableVisibility>;
4
+ type EnvironmentPromptArgs = {
5
+ nonInteractive: boolean;
6
+ selectedEnvironments?: EnvironmentVariableEnvironment[];
7
+ availableEnvironments?: EnvironmentVariableEnvironment[];
8
+ };
9
+ export declare function promptVariableEnvironmentAsync(input: EnvironmentPromptArgs & {
10
+ multiple: true;
11
+ }): Promise<EnvironmentVariableEnvironment[]>;
12
+ export declare function promptVariableEnvironmentAsync(input: EnvironmentPromptArgs & {
13
+ multiple?: false;
14
+ }): Promise<EnvironmentVariableEnvironment>;
3
15
  export declare function promptVariableValueAsync({ nonInteractive, required, hidden, initial, }: {
4
16
  nonInteractive: boolean;
5
17
  required?: boolean;
6
18
  initial?: string | null;
7
19
  hidden?: boolean;
8
20
  }): Promise<string>;
9
- export declare function promptVariableNameAsync(nonInteractive: boolean): Promise<string>;
21
+ export declare function promptVariableNameAsync(nonInteractive: boolean, initialValue?: string): Promise<string>;
22
+ export {};
@@ -1,19 +1,62 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.promptVariableNameAsync = exports.promptVariableValueAsync = exports.promptVariableEnvironmentAsync = void 0;
3
+ exports.promptVariableNameAsync = exports.promptVariableValueAsync = exports.promptVariableEnvironmentAsync = exports.promptVariableVisibilityAsync = exports.promptVariableTypeAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const chalk_1 = tslib_1.__importDefault(require("chalk"));
6
+ const capitalize_1 = tslib_1.__importDefault(require("./expodash/capitalize"));
6
7
  const generated_1 = require("../graphql/generated");
7
8
  const prompts_1 = require("../prompts");
8
- async function promptVariableEnvironmentAsync(nonInteractive) {
9
+ async function promptVariableTypeAsync(nonInteractive, initialType) {
10
+ if (nonInteractive) {
11
+ throw new Error('The `--type` flag must be set when running in `--non-interactive` mode.');
12
+ }
13
+ const options = [
14
+ {
15
+ title: 'String',
16
+ value: generated_1.EnvironmentSecretType.String,
17
+ },
18
+ {
19
+ title: 'File',
20
+ value: generated_1.EnvironmentSecretType.FileBase64,
21
+ },
22
+ ];
23
+ return await (0, prompts_1.selectAsync)('Select the type of variable', options, {
24
+ initial: initialType,
25
+ });
26
+ }
27
+ exports.promptVariableTypeAsync = promptVariableTypeAsync;
28
+ async function promptVariableVisibilityAsync(nonInteractive, selectedVisibility) {
29
+ if (nonInteractive) {
30
+ throw new Error('The `--visibility` flag must be set when running in `--non-interactive` mode.');
31
+ }
32
+ return await (0, prompts_1.selectAsync)('Select visibility:', Object.values(generated_1.EnvironmentVariableVisibility).map(visibility => ({
33
+ title: (0, capitalize_1.default)(visibility),
34
+ value: visibility,
35
+ selected: visibility === selectedVisibility,
36
+ })));
37
+ }
38
+ exports.promptVariableVisibilityAsync = promptVariableVisibilityAsync;
39
+ async function promptVariableEnvironmentAsync({ nonInteractive, selectedEnvironments, multiple = false, availableEnvironments, }) {
9
40
  if (nonInteractive) {
10
41
  throw new Error('The `--environment` flag must be set when running in `--non-interactive` mode.');
11
42
  }
12
- return await (0, prompts_1.selectAsync)('Select environment:', [
13
- { title: 'development', value: generated_1.EnvironmentVariableEnvironment.Development },
14
- { title: 'preview', value: generated_1.EnvironmentVariableEnvironment.Preview },
15
- { title: 'production', value: generated_1.EnvironmentVariableEnvironment.Production },
16
- ]);
43
+ if (!multiple) {
44
+ return await (0, prompts_1.selectAsync)('Select environment:', (availableEnvironments ?? Object.values(generated_1.EnvironmentVariableEnvironment)).map(environment => ({
45
+ title: environment,
46
+ value: environment,
47
+ })));
48
+ }
49
+ const { environments } = await (0, prompts_1.promptAsync)({
50
+ message: 'Select environment:',
51
+ name: 'environments',
52
+ type: 'multiselect',
53
+ choices: Object.values(generated_1.EnvironmentVariableEnvironment).map(environment => ({
54
+ title: environment,
55
+ value: environment,
56
+ selected: selectedEnvironments?.includes(environment),
57
+ })),
58
+ });
59
+ return environments;
17
60
  }
18
61
  exports.promptVariableEnvironmentAsync = promptVariableEnvironmentAsync;
19
62
  async function promptVariableValueAsync({ nonInteractive, required = true, hidden = false, initial, }) {
@@ -41,7 +84,7 @@ async function promptVariableValueAsync({ nonInteractive, required = true, hidde
41
84
  return variableValue;
42
85
  }
43
86
  exports.promptVariableValueAsync = promptVariableValueAsync;
44
- async function promptVariableNameAsync(nonInteractive) {
87
+ async function promptVariableNameAsync(nonInteractive, initialValue) {
45
88
  const validationMessage = 'Variable name may not be empty.';
46
89
  if (nonInteractive) {
47
90
  throw new Error(validationMessage);
@@ -50,6 +93,7 @@ async function promptVariableNameAsync(nonInteractive) {
50
93
  type: 'text',
51
94
  name: 'name',
52
95
  message: `Variable name:`,
96
+ initial: initialValue,
53
97
  validate: value => {
54
98
  if (!value) {
55
99
  return validationMessage;
@@ -0,0 +1,6 @@
1
+ import { EnvironmentVariableEnvironment, EnvironmentVariableFragment } from '../graphql/generated';
2
+ import { EnvironmentVariableWithFileContent } from '../graphql/queries/EnvironmentVariablesQuery';
3
+ export declare function formatVariableName(variable: EnvironmentVariableFragment): string;
4
+ export declare function formatVariableValue(variable: EnvironmentVariableWithFileContent): string;
5
+ export declare function performForEnvironmentsAsync(environments: EnvironmentVariableEnvironment[] | null, fun: (environment: EnvironmentVariableEnvironment | undefined) => Promise<any>): Promise<any[]>;
6
+ export declare function formatVariable(variable: EnvironmentVariableWithFileContent): string;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatVariable = exports.performForEnvironmentsAsync = exports.formatVariableValue = exports.formatVariableName = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const dateformat_1 = tslib_1.__importDefault(require("dateformat"));
6
+ const formatFields_1 = tslib_1.__importDefault(require("./formatFields"));
7
+ const generated_1 = require("../graphql/generated");
8
+ function formatVariableName(variable) {
9
+ const name = variable.name;
10
+ const scope = variable.scope === generated_1.EnvironmentVariableScope.Project ? 'project' : 'shared';
11
+ const environments = variable.environments?.join(', ') ?? '';
12
+ const updatedAt = variable.updatedAt ? new Date(variable.updatedAt).toLocaleString() : '';
13
+ const type = variable.type === generated_1.EnvironmentSecretType.FileBase64 ? 'file' : 'string';
14
+ const visibility = variable.visibility;
15
+ return `${name} | ${scope} | ${type} | ${visibility} | ${environments} | Updated at: ${updatedAt}`;
16
+ }
17
+ exports.formatVariableName = formatVariableName;
18
+ function formatVariableValue(variable) {
19
+ // TODO: Add Learn more link
20
+ if (variable.value) {
21
+ return variable.value;
22
+ }
23
+ if (variable.valueWithFileContent) {
24
+ return atob(variable.valueWithFileContent);
25
+ }
26
+ if (variable.visibility === generated_1.EnvironmentVariableVisibility.Sensitive) {
27
+ return '***** (This is a sensitive env variable. To access it, run command with --include-sensitive flag. Learn more.)';
28
+ }
29
+ if (variable.visibility === generated_1.EnvironmentVariableVisibility.Secret) {
30
+ return "***** (This is a secret env variable that can only be accessed on EAS builder and can't be read in any UI. Learn more.)";
31
+ }
32
+ if (variable.type === generated_1.EnvironmentSecretType.FileBase64) {
33
+ return '***** (This is a file env variable. To access it, run command with --include-file-content flag. Learn more.)';
34
+ }
35
+ return '*****';
36
+ }
37
+ exports.formatVariableValue = formatVariableValue;
38
+ async function performForEnvironmentsAsync(environments, fun) {
39
+ const selectedEnvironments = environments ?? [undefined];
40
+ return await Promise.all(selectedEnvironments.map(env => fun(env)));
41
+ }
42
+ exports.performForEnvironmentsAsync = performForEnvironmentsAsync;
43
+ function formatVariable(variable) {
44
+ return (0, formatFields_1.default)([
45
+ { label: 'ID', value: variable.id },
46
+ { label: 'Name', value: variable.name },
47
+ { label: 'Value', value: formatVariableValue(variable) },
48
+ { label: 'Scope', value: variable.scope },
49
+ { label: 'Visibility', value: variable.visibility ?? '' },
50
+ {
51
+ label: 'Environments',
52
+ value: variable.environments ? variable.environments.join(', ') : '-',
53
+ },
54
+ {
55
+ label: 'type',
56
+ value: variable.type === generated_1.EnvironmentSecretType.FileBase64 ? 'file' : 'string',
57
+ },
58
+ { label: 'Created at', value: (0, dateformat_1.default)(variable.createdAt, 'mmm dd HH:MM:ss') },
59
+ { label: 'Updated at', value: (0, dateformat_1.default)(variable.updatedAt, 'mmm dd HH:MM:ss') },
60
+ ]);
61
+ }
62
+ exports.formatVariable = formatVariable;
@@ -28,8 +28,13 @@ interface WorkerFileEntry {
28
28
  }
29
29
  /** Reads worker files while normalizing sourcemaps and providing normalized paths */
30
30
  declare function listWorkerFilesAsync(workerPath: string): AsyncGenerator<WorkerFileEntry>;
31
+ interface AssetFileEntry {
32
+ normalizedPath: string;
33
+ sha512: string;
34
+ path: string;
35
+ }
31
36
  /** Reads files of an asset maps and enumerates normalized paths and data */
32
- declare function listAssetMapFilesAsync(assetPath: string, assetMap: AssetMap): AsyncGenerator<WorkerFileEntry>;
37
+ declare function listAssetMapFilesAsync(assetPath: string, assetMap: AssetMap): AsyncGenerator<AssetFileEntry>;
33
38
  /** Entry of a normalized (gzip-safe) path and file data */
34
39
  export type FileEntry = readonly [normalizedPath: string, data: Buffer | string];
35
40
  /** Packs file entries into a tar.gz file (path to tgz returned) */
@@ -105,11 +105,10 @@ exports.listWorkerFilesAsync = listWorkerFilesAsync;
105
105
  async function* listAssetMapFilesAsync(assetPath, assetMap) {
106
106
  for (const normalizedPath in assetMap) {
107
107
  const filePath = node_path_1.default.resolve(assetPath, normalizedPath.split('/').join(node_path_1.default.sep));
108
- const data = await node_fs_1.default.promises.readFile(filePath);
109
108
  yield {
110
109
  normalizedPath,
111
110
  path: filePath,
112
- data,
111
+ sha512: assetMap[normalizedPath],
113
112
  };
114
113
  }
115
114
  }
@@ -13,6 +13,7 @@ export interface UploadResult {
13
13
  response: Response;
14
14
  }
15
15
  export declare function uploadAsync(params: UploadParams): Promise<UploadResult>;
16
+ export declare function callUploadApiAsync(url: string | URL, init?: RequestInit): Promise<unknown>;
16
17
  export interface UploadPending {
17
18
  params: UploadParams;
18
19
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.batchUploadAsync = exports.uploadAsync = void 0;
3
+ exports.batchUploadAsync = exports.callUploadApiAsync = exports.uploadAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const https = tslib_1.__importStar(require("https"));
6
6
  const https_proxy_agent_1 = tslib_1.__importDefault(require("https-proxy-agent"));
@@ -112,6 +112,30 @@ async function uploadAsync(params) {
112
112
  });
113
113
  }
114
114
  exports.uploadAsync = uploadAsync;
115
+ async function callUploadApiAsync(url, init) {
116
+ return await (0, promise_retry_1.default)(async (retry) => {
117
+ let response;
118
+ try {
119
+ response = await (0, node_fetch_1.default)(url, {
120
+ ...init,
121
+ agent: getAgent(),
122
+ });
123
+ }
124
+ catch (error) {
125
+ return retry(error);
126
+ }
127
+ if (response.status >= 500 && response.status <= 599) {
128
+ retry(new Error(`Deployment failed: ${response.statusText}`));
129
+ }
130
+ try {
131
+ return await response.json();
132
+ }
133
+ catch (error) {
134
+ retry(error);
135
+ }
136
+ });
137
+ }
138
+ exports.callUploadApiAsync = callUploadApiAsync;
115
139
  async function* batchUploadAsync(uploads) {
116
140
  const controller = new AbortController();
117
141
  const queue = new Set();
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "12.5.1",
2
+ "version": "12.5.3",
3
3
  "commands": {
4
4
  "analytics": {
5
5
  "id": "analytics",
@@ -1884,6 +1884,17 @@
1884
1884
  "description": "Overwrite existing variable",
1885
1885
  "allowNo": false
1886
1886
  },
1887
+ "type": {
1888
+ "name": "type",
1889
+ "type": "option",
1890
+ "description": "The type of variable",
1891
+ "helpValue": "(string|file)",
1892
+ "multiple": false,
1893
+ "options": [
1894
+ "string",
1895
+ "file"
1896
+ ]
1897
+ },
1887
1898
  "visibility": {
1888
1899
  "name": "visibility",
1889
1900
  "type": "option",
@@ -1913,7 +1924,7 @@
1913
1924
  "type": "option",
1914
1925
  "description": "Environment variable's environment",
1915
1926
  "helpValue": "(development|preview|production)",
1916
- "multiple": false,
1927
+ "multiple": true,
1917
1928
  "options": [
1918
1929
  "development",
1919
1930
  "preview",
@@ -1944,12 +1955,24 @@
1944
1955
  "hidden": true,
1945
1956
  "aliases": [],
1946
1957
  "flags": {
1947
- "name": {
1948
- "name": "name",
1958
+ "variable-name": {
1959
+ "name": "variable-name",
1949
1960
  "type": "option",
1950
1961
  "description": "Name of the variable to delete",
1951
1962
  "multiple": false
1952
1963
  },
1964
+ "variable-environment": {
1965
+ "name": "variable-environment",
1966
+ "type": "option",
1967
+ "description": "Current environment of the variable to delete",
1968
+ "helpValue": "(development|preview|production)",
1969
+ "multiple": false,
1970
+ "options": [
1971
+ "development",
1972
+ "preview",
1973
+ "production"
1974
+ ]
1975
+ },
1953
1976
  "scope": {
1954
1977
  "name": "scope",
1955
1978
  "type": "option",
@@ -1962,18 +1985,6 @@
1962
1985
  ],
1963
1986
  "default": "PROJECT"
1964
1987
  },
1965
- "environment": {
1966
- "name": "environment",
1967
- "type": "option",
1968
- "description": "Environment variable's environment",
1969
- "helpValue": "(development|preview|production)",
1970
- "multiple": false,
1971
- "options": [
1972
- "development",
1973
- "preview",
1974
- "production"
1975
- ]
1976
- },
1977
1988
  "non-interactive": {
1978
1989
  "name": "non-interactive",
1979
1990
  "type": "boolean",
@@ -2038,12 +2049,24 @@
2038
2049
  "hidden": true,
2039
2050
  "aliases": [],
2040
2051
  "flags": {
2041
- "name": {
2042
- "name": "name",
2052
+ "variable-name": {
2053
+ "name": "variable-name",
2043
2054
  "type": "option",
2044
2055
  "description": "Name of the variable",
2045
2056
  "multiple": false
2046
2057
  },
2058
+ "variable-environment": {
2059
+ "name": "variable-environment",
2060
+ "type": "option",
2061
+ "description": "Current environment of the variable",
2062
+ "helpValue": "(development|preview|production)",
2063
+ "multiple": false,
2064
+ "options": [
2065
+ "development",
2066
+ "preview",
2067
+ "production"
2068
+ ]
2069
+ },
2047
2070
  "format": {
2048
2071
  "name": "format",
2049
2072
  "type": "option",
@@ -2073,18 +2096,6 @@
2073
2096
  "type": "boolean",
2074
2097
  "description": "Run the command in non-interactive mode.",
2075
2098
  "allowNo": false
2076
- },
2077
- "environment": {
2078
- "name": "environment",
2079
- "type": "option",
2080
- "description": "Environment variable's environment",
2081
- "helpValue": "(development|preview|production)",
2082
- "multiple": false,
2083
- "options": [
2084
- "development",
2085
- "preview",
2086
- "production"
2087
- ]
2088
2099
  }
2089
2100
  },
2090
2101
  "args": {},
@@ -2103,18 +2114,30 @@
2103
2114
  "hidden": true,
2104
2115
  "aliases": [],
2105
2116
  "flags": {
2106
- "name": {
2107
- "name": "name",
2117
+ "variable-name": {
2118
+ "name": "variable-name",
2108
2119
  "type": "option",
2109
2120
  "description": "Name of the variable",
2110
2121
  "multiple": false
2111
2122
  },
2123
+ "variable-environment": {
2124
+ "name": "variable-environment",
2125
+ "type": "option",
2126
+ "description": "Current environment of the variable to link",
2127
+ "helpValue": "(development|preview|production)",
2128
+ "multiple": false,
2129
+ "options": [
2130
+ "development",
2131
+ "preview",
2132
+ "production"
2133
+ ]
2134
+ },
2112
2135
  "environment": {
2113
2136
  "name": "environment",
2114
2137
  "type": "option",
2115
2138
  "description": "Environment variable's environment",
2116
2139
  "helpValue": "(development|preview|production)",
2117
- "multiple": false,
2140
+ "multiple": true,
2118
2141
  "options": [
2119
2142
  "development",
2120
2143
  "preview",
@@ -2150,6 +2173,12 @@
2150
2173
  "description": "Display sensitive values in the output",
2151
2174
  "allowNo": false
2152
2175
  },
2176
+ "include-file-content": {
2177
+ "name": "include-file-content",
2178
+ "type": "boolean",
2179
+ "description": "Display files content in the output",
2180
+ "allowNo": false
2181
+ },
2153
2182
  "format": {
2154
2183
  "name": "format",
2155
2184
  "type": "option",
@@ -2179,7 +2208,7 @@
2179
2208
  "type": "option",
2180
2209
  "description": "Environment variable's environment",
2181
2210
  "helpValue": "(development|preview|production)",
2182
- "multiple": false,
2211
+ "multiple": true,
2183
2212
  "options": [
2184
2213
  "development",
2185
2214
  "preview",
@@ -2281,8 +2310,8 @@
2281
2310
  "hidden": true,
2282
2311
  "aliases": [],
2283
2312
  "flags": {
2284
- "name": {
2285
- "name": "name",
2313
+ "variable-name": {
2314
+ "name": "variable-name",
2286
2315
  "type": "option",
2287
2316
  "description": "Name of the variable",
2288
2317
  "multiple": false
@@ -2292,7 +2321,7 @@
2292
2321
  "type": "option",
2293
2322
  "description": "Environment variable's environment",
2294
2323
  "helpValue": "(development|preview|production)",
2295
- "multiple": false,
2324
+ "multiple": true,
2296
2325
  "options": [
2297
2326
  "development",
2298
2327
  "preview",
@@ -2322,18 +2351,47 @@
2322
2351
  "hidden": true,
2323
2352
  "aliases": [],
2324
2353
  "flags": {
2354
+ "variable-name": {
2355
+ "name": "variable-name",
2356
+ "type": "option",
2357
+ "description": "Current name of the variable",
2358
+ "multiple": false
2359
+ },
2360
+ "variable-environment": {
2361
+ "name": "variable-environment",
2362
+ "type": "option",
2363
+ "description": "Current environment of the variable to update",
2364
+ "helpValue": "(development|preview|production)",
2365
+ "multiple": false,
2366
+ "options": [
2367
+ "development",
2368
+ "preview",
2369
+ "production"
2370
+ ]
2371
+ },
2325
2372
  "name": {
2326
2373
  "name": "name",
2327
2374
  "type": "option",
2328
- "description": "Name of the variable",
2375
+ "description": "New name of the variable",
2329
2376
  "multiple": false
2330
2377
  },
2331
2378
  "value": {
2332
2379
  "name": "value",
2333
2380
  "type": "option",
2334
- "description": "Text value or the variable",
2381
+ "description": "New value or the variable",
2335
2382
  "multiple": false
2336
2383
  },
2384
+ "type": {
2385
+ "name": "type",
2386
+ "type": "option",
2387
+ "description": "The type of variable",
2388
+ "helpValue": "(string|file)",
2389
+ "multiple": false,
2390
+ "options": [
2391
+ "string",
2392
+ "file"
2393
+ ]
2394
+ },
2337
2395
  "visibility": {
2338
2396
  "name": "visibility",
2339
2397
  "type": "option",
@@ -2363,7 +2421,7 @@
2363
2421
  "type": "option",
2364
2422
  "description": "Environment variable's environment",
2365
2423
  "helpValue": "(development|preview|production)",
2366
- "multiple": false,
2424
+ "multiple": true,
2367
2425
  "options": [
2368
2426
  "development",
2369
2427
  "preview",
@@ -2907,7 +2965,6 @@
2907
2965
  "name": "rollout-percentage",
2908
2966
  "type": "option",
2909
2967
  "description": "Percentage of users this update should be immediately available to. Users not in the rollout will be served the previous latest update on the branch, even if that update is itself being rolled out. The specified number must be an integer between 1 and 100. When not specified, this defaults to 100.",
2910
- "hidden": true,
2911
2968
  "required": false,
2912
2969
  "multiple": false
2913
2970
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eas-cli",
3
3
  "description": "EAS command line tool",
4
- "version": "12.5.1",
4
+ "version": "12.5.3",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bin": {
7
7
  "eas": "./bin/run"
@@ -14,7 +14,7 @@
14
14
  "@expo/config-plugins": "7.8.4",
15
15
  "@expo/config-types": "50.0.0",
16
16
  "@expo/eas-build-job": "1.0.136",
17
- "@expo/eas-json": "12.5.0",
17
+ "@expo/eas-json": "12.5.2",
18
18
  "@expo/env": "^0.3.0",
19
19
  "@expo/json-file": "8.2.37",
20
20
  "@expo/logger": "1.0.117",
@@ -228,5 +228,5 @@
228
228
  "node": "20.11.0",
229
229
  "yarn": "1.22.21"
230
230
  },
231
- "gitHead": "01676a4f8821e46215f236f2a105d820e6df2872"
231
+ "gitHead": "56444432b91bc60062891526946678da45ed2f2c"
232
232
  }
@@ -1,2 +0,0 @@
1
- import { EnvironmentVariableFragment } from '../graphql/generated';
2
- export declare function formatVariable(variable: EnvironmentVariableFragment): string;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatVariable = void 0;
4
- const tslib_1 = require("tslib");
5
- const dateformat_1 = tslib_1.__importDefault(require("dateformat"));
6
- const formatFields_1 = tslib_1.__importDefault(require("./formatFields"));
7
- function formatVariable(variable) {
8
- return (0, formatFields_1.default)([
9
- { label: 'ID', value: variable.id },
10
- { label: 'Name', value: variable.name },
11
- { label: 'Value', value: variable.value ?? '(secret)' },
12
- { label: 'Scope', value: variable.scope },
13
- { label: 'Created at', value: (0, dateformat_1.default)(variable.createdAt, 'mmm dd HH:MM:ss') },
14
- ]);
15
- }
16
- exports.formatVariable = formatVariable;