runcloud 0.2.142 → 0.2.144

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.
@@ -950,7 +950,7 @@ async function createSimulatorSession(platform, opts) {
950
950
  .filter((id) => typeof id === 'string' && id.length > 0),
951
951
  ];
952
952
  return await client().post(`/run-cloud/${platform}`, {
953
- ...(platform === 'android' ? { expoSdkProfile: opts.expoSdkProfile } : {}),
953
+ ...(platform === 'android' ? { expoSdkProfile: opts.expoSdkProfile ?? 'expo-54' } : {}),
954
954
  ...(opts.orgId ? { orgId: opts.orgId } : {}),
955
955
  model: opts.model,
956
956
  region: opts.region,
@@ -1042,7 +1042,7 @@ function registerSimulatorCommands(program, platform) {
1042
1042
  .option('--json', 'output JSON', false)
1043
1043
  .addOption(new Option('--dev-host <host>', 'dev-only: target a specific simulator fleet host').hideHelp());
1044
1044
  if (platform === 'android') {
1045
- createCommand.addOption(new Option('--expo-sdk-profile <profile>', 'required immutable Expo SDK capacity profile').choices(['expo-54', 'expo-57']).makeOptionMandatory());
1045
+ createCommand.addOption(new Option('--expo-sdk-profile <profile>', 'preinstalled Expo Go version; omit when installing a custom APK').choices(['expo-54']));
1046
1046
  }
1047
1047
  createCommand
1048
1048
  .action((opts) => action(async () => {
@@ -1247,7 +1247,27 @@ function registerSimulatorCommands(program, platform) {
1247
1247
  const asset = await pushAsset(path, { contentType, orgId: opts.orgId });
1248
1248
  const api = client();
1249
1249
  try {
1250
- const result = await api.post(`/run-cloud/${platform}/${encodeURIComponent(id)}/gallery`, { assetId: asset.id });
1250
+ const path = `/run-cloud/${platform}/${encodeURIComponent(id)}/gallery`;
1251
+ let result = await api.post(path, { assetId: asset.id, async: true });
1252
+ if (typeof result.operationId === 'string') {
1253
+ const operationId = result.operationId;
1254
+ if (!/^[a-zA-Z0-9-]{1,128}$/.test(operationId))
1255
+ throw new Error('Invalid gallery operation receipt');
1256
+ const signal = AbortSignal.timeout(11 * 60_000);
1257
+ while (result.status === 'pending') {
1258
+ await new Promise(resolve => setTimeout(resolve, 1000));
1259
+ result = await api.get(`${path}/${encodeURIComponent(operationId)}`, { signal });
1260
+ if (result.operationId !== operationId)
1261
+ throw new Error('Gallery operation identity changed');
1262
+ }
1263
+ if (result.status !== 'completed' || result.ok !== true || !result.result) {
1264
+ throw new Error('Could not import the file into the device gallery');
1265
+ }
1266
+ result = { ...result.result, asset };
1267
+ }
1268
+ if (result.ok !== true || result.byteSize !== blob.size || result.contentType !== contentType) {
1269
+ throw new Error('The device did not confirm the gallery import');
1270
+ }
1251
1271
  if (opts.json)
1252
1272
  console.log(JSON.stringify(result, null, 2));
1253
1273
  else
@@ -1661,7 +1681,7 @@ export function registerRunCloud(program) {
1661
1681
  .option('--inactivity-timeout <duration>', 'idle timeout such as 60s, 3m, or none')
1662
1682
  .option('--hard-timeout <duration>', 'maximum lifetime such as 10m or 1h')
1663
1683
  .option('--codec <auto|mjpeg|webrtc>', 'viewer codec', 'auto')
1664
- .addOption(new Option('--expo-sdk-profile <profile>', 'required for Android: immutable Expo SDK capacity profile').choices(['expo-54', 'expo-57']))
1684
+ .addOption(new Option('--expo-sdk-profile <profile>', 'preinstalled Expo Go version; omit when launching a custom APK').choices(['expo-54']))
1665
1685
  .option('--json', 'output JSON', false)
1666
1686
  .action((opts) => action(async () => {
1667
1687
  if (Boolean(opts.asset) === Boolean(opts.build)) {
@@ -1670,9 +1690,6 @@ export function registerRunCloud(program) {
1670
1690
  if (opts.platform !== 'ios' && opts.platform !== 'android') {
1671
1691
  throw new Error('--platform must be ios or android');
1672
1692
  }
1673
- if (opts.platform === 'android' && !opts.expoSdkProfile) {
1674
- throw new Error('--expo-sdk-profile is required when --platform android');
1675
- }
1676
1693
  if (opts.platform === 'ios' && opts.expoSdkProfile) {
1677
1694
  throw new Error('--expo-sdk-profile is supported only when --platform android');
1678
1695
  }
@@ -1681,7 +1698,7 @@ export function registerRunCloud(program) {
1681
1698
  platform: opts.platform,
1682
1699
  ...(opts.orgId ? { orgId: opts.orgId } : {}),
1683
1700
  session: {
1684
- ...(opts.platform === 'android' ? { expoSdkProfile: opts.expoSdkProfile } : {}),
1701
+ ...(opts.platform === 'android' ? { expoSdkProfile: opts.expoSdkProfile ?? 'expo-54' } : {}),
1685
1702
  ...(opts.model ? { model: opts.model } : {}),
1686
1703
  ...(opts.region ? { region: opts.region } : {}),
1687
1704
  ...(opts.displayName ? { displayName: opts.displayName } : {}),
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = '0.2.142';
1
+ export const CLI_VERSION = '0.2.144';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runcloud",
3
- "version": "0.2.142",
3
+ "version": "0.2.144",
4
4
  "description": "Create and control run.cloud remote mobile simulators and cloud sandboxes",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
Binary file
Binary file