runcloud 0.2.148 → 0.2.149

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.
@@ -86,6 +86,13 @@ export async function runDomainConnect(client, projectId, hostname, opts, log =
86
86
  log(renderProjectDomain(result.domain));
87
87
  log(JSON.stringify(result.dns_instructions, null, 2));
88
88
  }
89
+ export async function runDomainConnectRegistered(client, projectId, hostname, log = console.log) {
90
+ const result = await client.post(`/projects/${projectId}/domains/connect-registered`, {
91
+ hostname,
92
+ });
93
+ log(renderProjectDomain(result.domain));
94
+ log(JSON.stringify(result.dns_instructions, null, 2));
95
+ }
89
96
  export async function runDomainStatus(client, projectId, hostnameOrId, log = console.log) {
90
97
  const list = (await client.get(`/projects/${projectId}/domains`));
91
98
  const projectDomains = list.domains ?? [];
@@ -184,6 +191,21 @@ export function registerDomains(program) {
184
191
  process.exitCode = 1;
185
192
  }
186
193
  });
194
+ domains
195
+ .command('connect-registered')
196
+ .argument('<hostname>')
197
+ .option('--project <id>', 'project id (defaults to the linked directory)')
198
+ .description('Connect a domain Newly already registered for this project to the published website (retries the automatic connect)')
199
+ .action(async (hostname, opts) => {
200
+ try {
201
+ const { client, projectId } = makeClient(opts.project);
202
+ await runDomainConnectRegistered(client, projectId, hostname);
203
+ }
204
+ catch (e) {
205
+ console.error(friendlyApiError(e));
206
+ process.exitCode = 1;
207
+ }
208
+ });
187
209
  domains
188
210
  .command('status')
189
211
  .argument('[hostname-or-id]')
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const CLI_VERSION = '0.2.148';
1
+ export const CLI_VERSION = '0.2.149';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runcloud",
3
- "version": "0.2.148",
3
+ "version": "0.2.149",
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