runcloud 0.2.149 → 0.2.151
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.
- package/README.md +2 -8
- package/dist/commands/domains.js +15 -0
- package/dist/commands/run-cloud.js +0 -9
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/runcloud-0.2.151.tgz +0 -0
- package/runcloud-0.2.149.tgz +0 -0
package/README.md
CHANGED
|
@@ -80,8 +80,8 @@ runcloud ios logs <id> --tail 200 # read logs from this
|
|
|
80
80
|
runcloud ios logs <id> --follow # follow new log entries
|
|
81
81
|
runcloud ios delete <id> # release the session
|
|
82
82
|
|
|
83
|
-
# Android
|
|
84
|
-
runcloud android create --model pixel
|
|
83
|
+
# Android sessions use the available emulator pool.
|
|
84
|
+
runcloud android create --model pixel
|
|
85
85
|
runcloud android swipe <id> 0.5 0.8 0.5 0.2 --duration 250
|
|
86
86
|
runcloud android press-key <id> enter
|
|
87
87
|
runcloud android accessibility-tree <id> --json
|
|
@@ -90,12 +90,6 @@ runcloud android mic inject <id> ./tone.wav --bundle-id com.example.Recorder
|
|
|
90
90
|
runcloud android screenshot <id> --output android.png --json
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Use `--expo-sdk-profile expo-54` for Expo 54 projects and `expo-57` for Expo 57
|
|
94
|
-
projects. `create`, `get`, `list`, and `mobile launch --json` expose the selected
|
|
95
|
-
profile and immutable Expo Go APK, emulator image, toolchain, and profile
|
|
96
|
-
digests. If that profile is full, the command returns
|
|
97
|
-
`expo_profile_capacity_unavailable`; it does not lease the other pool.
|
|
98
|
-
|
|
99
93
|
`open-url` accepts HTTPS URLs and application deep links on both platforms. Keep
|
|
100
94
|
the complete target quoted so its URI delimiters stay in one argument:
|
|
101
95
|
|
package/dist/commands/domains.js
CHANGED
|
@@ -2,6 +2,11 @@ import { stdin as input, stdout as output } from 'node:process';
|
|
|
2
2
|
import { createInterface } from 'node:readline/promises';
|
|
3
3
|
import { ApiClient, friendlyApiError } from '../api.js';
|
|
4
4
|
import { requireCredentials, resolveProject } from '../config.js';
|
|
5
|
+
export function renderPendingRegistration(order) {
|
|
6
|
+
const action = `run \`newly domains connect-registered ${order.domain}\``;
|
|
7
|
+
const base = `${order.domain} ${order.status} (not connected) — ${action}`;
|
|
8
|
+
return order.error_message ? `${base} (error: ${order.error_message})` : base;
|
|
9
|
+
}
|
|
5
10
|
function makeClient(project) {
|
|
6
11
|
const creds = requireCredentials();
|
|
7
12
|
return {
|
|
@@ -76,6 +81,9 @@ export async function runDomainList(client, projectId, log = console.log) {
|
|
|
76
81
|
const result = (await client.get(`/projects/${projectId}/domains`));
|
|
77
82
|
const projectDomains = result.domains ?? [];
|
|
78
83
|
log(projectDomains.length ? projectDomains.map(renderProjectDomain).join('\n') : 'No domains.');
|
|
84
|
+
const pending = result.pending_registrations ?? [];
|
|
85
|
+
if (pending.length)
|
|
86
|
+
log(pending.map(renderPendingRegistration).join('\n'));
|
|
79
87
|
}
|
|
80
88
|
export async function runDomainConnect(client, projectId, hostname, opts, log = console.log) {
|
|
81
89
|
const result = await client.post(`/projects/${projectId}/domains/connect`, {
|
|
@@ -99,6 +107,13 @@ export async function runDomainStatus(client, projectId, hostnameOrId, log = con
|
|
|
99
107
|
const domain = hostnameOrId
|
|
100
108
|
? projectDomains.find((item) => item.id === hostnameOrId || item.hostname === hostnameOrId)
|
|
101
109
|
: projectDomains[0];
|
|
110
|
+
if (!domain && hostnameOrId) {
|
|
111
|
+
const pending = (list.pending_registrations ?? []).find((order) => order.domain === hostnameOrId);
|
|
112
|
+
if (pending) {
|
|
113
|
+
log(renderPendingRegistration(pending));
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
102
117
|
if (!domain)
|
|
103
118
|
throw new Error('Domain not found.');
|
|
104
119
|
const refreshed = await client.post(`/projects/${projectId}/domains/${domain.id}/refresh`, {});
|
|
@@ -950,7 +950,6 @@ 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 ?? 'expo-54' } : {}),
|
|
954
953
|
...(opts.orgId ? { orgId: opts.orgId } : {}),
|
|
955
954
|
model: opts.model,
|
|
956
955
|
region: opts.region,
|
|
@@ -1041,9 +1040,6 @@ function registerSimulatorCommands(program, platform) {
|
|
|
1041
1040
|
.option('--rm', 'release the session when this command exits', false)
|
|
1042
1041
|
.option('--json', 'output JSON', false)
|
|
1043
1042
|
.addOption(new Option('--dev-host <host>', 'dev-only: target a specific simulator fleet host').hideHelp());
|
|
1044
|
-
if (platform === 'android') {
|
|
1045
|
-
createCommand.addOption(new Option('--expo-sdk-profile <profile>', 'preinstalled Expo Go version; omit when installing a custom APK').choices(['expo-54']));
|
|
1046
|
-
}
|
|
1047
1043
|
createCommand
|
|
1048
1044
|
.action((opts) => action(async () => {
|
|
1049
1045
|
print(await createSimulatorSession(platform, opts), opts);
|
|
@@ -1681,7 +1677,6 @@ export function registerRunCloud(program) {
|
|
|
1681
1677
|
.option('--inactivity-timeout <duration>', 'idle timeout such as 60s, 3m, or none')
|
|
1682
1678
|
.option('--hard-timeout <duration>', 'maximum lifetime such as 10m or 1h')
|
|
1683
1679
|
.option('--codec <auto|mjpeg|webrtc>', 'viewer codec', 'auto')
|
|
1684
|
-
.addOption(new Option('--expo-sdk-profile <profile>', 'preinstalled Expo Go version; omit when launching a custom APK').choices(['expo-54']))
|
|
1685
1680
|
.option('--json', 'output JSON', false)
|
|
1686
1681
|
.action((opts) => action(async () => {
|
|
1687
1682
|
if (Boolean(opts.asset) === Boolean(opts.build)) {
|
|
@@ -1690,15 +1685,11 @@ export function registerRunCloud(program) {
|
|
|
1690
1685
|
if (opts.platform !== 'ios' && opts.platform !== 'android') {
|
|
1691
1686
|
throw new Error('--platform must be ios or android');
|
|
1692
1687
|
}
|
|
1693
|
-
if (opts.platform === 'ios' && opts.expoSdkProfile) {
|
|
1694
|
-
throw new Error('--expo-sdk-profile is supported only when --platform android');
|
|
1695
|
-
}
|
|
1696
1688
|
print(await client().postWithHeaders('/run-cloud/mobile/launch', {
|
|
1697
1689
|
...(opts.asset ? { assetId: opts.asset } : { buildId: opts.build }),
|
|
1698
1690
|
platform: opts.platform,
|
|
1699
1691
|
...(opts.orgId ? { orgId: opts.orgId } : {}),
|
|
1700
1692
|
session: {
|
|
1701
|
-
...(opts.platform === 'android' ? { expoSdkProfile: opts.expoSdkProfile ?? 'expo-54' } : {}),
|
|
1702
1693
|
...(opts.model ? { model: opts.model } : {}),
|
|
1703
1694
|
...(opts.region ? { region: opts.region } : {}),
|
|
1704
1695
|
...(opts.displayName ? { displayName: opts.displayName } : {}),
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = '0.2.
|
|
1
|
+
export const CLI_VERSION = '0.2.151';
|
package/package.json
CHANGED
|
Binary file
|
package/runcloud-0.2.149.tgz
DELETED
|
Binary file
|