eas-cli 16.14.1 → 16.16.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 (40) hide show
  1. package/README.md +137 -84
  2. package/build/commandUtils/workflow/fetchLogs.d.ts +2 -0
  3. package/build/commandUtils/workflow/fetchLogs.js +16 -0
  4. package/build/commandUtils/workflow/stateMachine.d.ts +44 -0
  5. package/build/commandUtils/workflow/stateMachine.js +212 -0
  6. package/build/commandUtils/workflow/types.d.ts +39 -0
  7. package/build/commandUtils/workflow/types.js +13 -0
  8. package/build/commandUtils/workflow/utils.d.ts +12 -0
  9. package/build/commandUtils/workflow/utils.js +116 -0
  10. package/build/commands/deploy/index.js +47 -49
  11. package/build/commands/workflow/cancel.js +3 -6
  12. package/build/commands/workflow/logs.d.ts +18 -0
  13. package/build/commands/workflow/logs.js +94 -0
  14. package/build/commands/workflow/run.d.ts +105 -0
  15. package/build/commands/workflow/run.js +280 -0
  16. package/build/commands/workflow/runs.js +4 -3
  17. package/build/commands/workflow/view.d.ts +17 -0
  18. package/build/commands/workflow/view.js +95 -0
  19. package/build/credentials/ios/appstore/bundleIdCapabilities.d.ts +4 -17
  20. package/build/credentials/ios/appstore/bundleIdCapabilities.js +45 -625
  21. package/build/credentials/ios/appstore/capabilityIdentifiers.js +33 -34
  22. package/build/credentials/ios/appstore/capabilityList.d.ts +33 -0
  23. package/build/credentials/ios/appstore/capabilityList.js +646 -0
  24. package/build/graphql/generated.d.ts +236 -19
  25. package/build/graphql/queries/WorkflowJobQuery.d.ts +7 -0
  26. package/build/graphql/queries/WorkflowJobQuery.js +29 -0
  27. package/build/graphql/queries/WorkflowRunQuery.js +13 -13
  28. package/build/graphql/types/WorkflowJob.d.ts +1 -0
  29. package/build/graphql/types/WorkflowJob.js +32 -0
  30. package/build/graphql/types/WorkflowRun.js +18 -0
  31. package/build/worker/assets.d.ts +19 -16
  32. package/build/worker/assets.js +51 -22
  33. package/build/worker/upload.d.ts +21 -9
  34. package/build/worker/upload.js +98 -80
  35. package/build/worker/utils/multipart.d.ts +11 -0
  36. package/build/worker/utils/multipart.js +98 -0
  37. package/oclif.manifest.json +85 -1
  38. package/package.json +2 -2
  39. package/build/commandUtils/workflows.d.ts +0 -20
  40. package/build/commandUtils/workflows.js +0 -21
@@ -4,6 +4,7 @@ exports.syncCapabilityIdentifiersForEntitlementsAsync = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const apple_utils_1 = require("@expo/apple-utils");
6
6
  const bundleIdCapabilities_1 = require("./bundleIdCapabilities");
7
+ const capabilityList_1 = require("./capabilityList");
7
8
  const log_1 = tslib_1.__importDefault(require("../../../log"));
8
9
  const authType_1 = require("../utils/authType");
9
10
  /**
@@ -30,7 +31,8 @@ async function syncCapabilityIdentifiersForEntitlementsAsync(bundleId, entitleme
30
31
  }
31
32
  const createdIds = [];
32
33
  const linkedIds = [];
33
- const CapabilityIdMapping = bundleIdCapabilities_1.CapabilityMapping.filter(capability => capability.capabilityIdModel);
34
+ // these are only APPLE_PAY, ICLOUD, APP_GROUPS
35
+ const CapabilityIdMapping = capabilityList_1.CapabilityMapping.filter(capability => capability.capabilityIdModel);
34
36
  const updateRequest = [];
35
37
  // Iterate through the supported capabilities to build the request.
36
38
  for (const classifier of CapabilityIdMapping) {
@@ -57,49 +59,46 @@ async function syncCapabilityIdentifiersForEntitlementsAsync(bundleId, entitleme
57
59
  const existingIds = await CapabilityModel.getAsync(bundleId.context);
58
60
  // A list of server IDs for linking.
59
61
  const capabilityIdOpaqueIds = [];
62
+ const capabilitiesWithoutRemoteModels = capabilityIds.filter(localId => existingIds.find(model => model.attributes.identifier === localId) === undefined);
60
63
  // Iterate through all the local IDs and see if they exist on the server.
61
- for (const localId of capabilityIds) {
62
- let remoteIdModel = existingIds.find(model => model.attributes.identifier === localId);
63
- // If a remote ID exists, then create it.
64
- if (!remoteIdModel) {
65
- if (log_1.default.isDebug) {
66
- log_1.default.log(`Creating capability ID: ${localId} (${CapabilityModel.type})`);
67
- }
68
- try {
69
- remoteIdModel = await CapabilityModel.createAsync(bundleId.context, {
70
- identifier: localId,
71
- });
72
- }
73
- catch (error) {
74
- // Add a more helpful error message.
75
- error.message += `\n\nRemove the value '${localId}' from the array '${classifier.entitlement}' in the iOS project entitlements.\nIf you know that the ID is registered to one of your apps, try again with a different Apple account.`;
76
- throw error;
77
- }
78
- // Create a list of newly created IDs for displaying in the CLI.
79
- createdIds.push(localId);
80
- if (log_1.default.isDebug) {
81
- log_1.default.log(`Created capability ID: ${remoteIdModel.id}`);
82
- }
64
+ for (const localId of capabilitiesWithoutRemoteModels) {
65
+ let remoteIdModel = undefined;
66
+ if (log_1.default.isDebug) {
67
+ log_1.default.log(`Creating capability ID: ${localId} (${CapabilityModel.type})`);
68
+ }
69
+ try {
70
+ remoteIdModel = await CapabilityModel.createAsync(bundleId.context, {
71
+ identifier: localId,
72
+ });
73
+ }
74
+ catch (error) {
75
+ // Add a more helpful error message.
76
+ error.message += `\n\nRemove the value '${localId}' from the array '${classifier.entitlement}' in the iOS project entitlements.\nIf you know that the ID is registered to one of your apps, try again with a different Apple account.`;
77
+ throw error;
83
78
  }
84
79
  if (log_1.default.isDebug) {
85
- log_1.default.log(`Linking ID to ${CapabilityModel.type}: ${localId} (${remoteIdModel.id})`);
80
+ log_1.default.log(`Created capability ID: ${remoteIdModel.id}`);
86
81
  }
87
- // Create a list of linked IDs for displaying in the CLI.
82
+ // add to a list of newly created IDs for displaying in the CLI.
83
+ createdIds.push(localId);
84
+ // add to a list of linked IDs for displaying in the CLI.
88
85
  linkedIds.push(remoteIdModel.attributes.identifier);
89
86
  capabilityIdOpaqueIds.push(remoteIdModel.id);
90
87
  }
91
- updateRequest.push({
92
- capabilityType: classifier.capability,
93
- option: apple_utils_1.CapabilityTypeOption.ON,
94
- relationships: {
95
- // One of: `merchantIds`, `appGroups`, `cloudContainers`.
96
- [CapabilityModel.type]: capabilityIdOpaqueIds,
97
- },
98
- });
88
+ if (capabilityIdOpaqueIds.length) {
89
+ updateRequest.push({
90
+ capabilityType: classifier.capability,
91
+ option: apple_utils_1.CapabilityTypeOption.ON,
92
+ relationships: {
93
+ // One of: `merchantIds`, `appGroups`, `cloudContainers`.
94
+ [CapabilityModel.type]: capabilityIdOpaqueIds,
95
+ },
96
+ });
97
+ }
99
98
  }
100
99
  if (updateRequest.length) {
101
100
  if (log_1.default.isDebug) {
102
- log_1.default.log(`Updating bundle identifier with capability identifiers:`, updateRequest);
101
+ log_1.default.log(`Updating bundle identifier with capability identifiers:`, JSON.stringify(updateRequest, null, 2));
103
102
  }
104
103
  await bundleId.updateBundleIdCapabilityAsync(updateRequest);
105
104
  }
@@ -0,0 +1,33 @@
1
+ /// <reference types="@expo/apple-utils/ts-declarations/expo__app-store" />
2
+ import { BundleIdCapability, CapabilityType, MerchantId } from '@expo/apple-utils';
3
+ import { JSONObject, JSONValue } from '@expo/json-file';
4
+ declare const skipOp: {
5
+ readonly op: "skip";
6
+ };
7
+ declare const disableOp: {
8
+ readonly op: "disable";
9
+ };
10
+ type GetSyncOperation = (opts: {
11
+ existingRemote: BundleIdCapability | null;
12
+ entitlementValue: JSONValue;
13
+ entitlements: JSONObject;
14
+ additionalOptions: {
15
+ usesBroadcastPushNotifications: boolean;
16
+ };
17
+ }) => {
18
+ op: 'enable';
19
+ option: JSONValue;
20
+ } | typeof skipOp | typeof disableOp;
21
+ export type CapabilityClassifier = {
22
+ name: string;
23
+ entitlement: string;
24
+ capability: CapabilityType;
25
+ validateOptions: (options: any) => boolean;
26
+ capabilityIdModel?: typeof MerchantId;
27
+ getSyncOperation: GetSyncOperation;
28
+ capabilityIdPrefix?: string;
29
+ options?: undefined;
30
+ };
31
+ export declare const CapabilityMapping: CapabilityClassifier[];
32
+ export declare const associatedDomainsCapabilityType: CapabilityClassifier;
33
+ export {};