@xano/cli 0.0.39 → 0.0.40
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
CHANGED
|
@@ -312,8 +312,8 @@ xano tenant push ./my-tenant -t <tenant_name> --truncate
|
|
|
312
312
|
# Deploy a platform version
|
|
313
313
|
xano tenant deploy_platform <tenant_name> --platform_id 5
|
|
314
314
|
|
|
315
|
-
# Deploy a release
|
|
316
|
-
xano tenant deploy_release <tenant_name> --
|
|
315
|
+
# Deploy a release by name
|
|
316
|
+
xano tenant deploy_release <tenant_name> --release v1.0
|
|
317
317
|
```
|
|
318
318
|
|
|
319
319
|
#### Tenant License
|
|
@@ -7,7 +7,7 @@ export default class TenantDeployRelease extends BaseCommand {
|
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
9
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
-
|
|
10
|
+
release: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
12
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
@@ -13,10 +13,10 @@ export default class TenantDeployRelease extends BaseCommand {
|
|
|
13
13
|
};
|
|
14
14
|
static description = 'Deploy a release to a tenant';
|
|
15
15
|
static examples = [
|
|
16
|
-
`$ xano tenant deploy_release t1234-abcd-xyz1 --
|
|
17
|
-
Deployed release
|
|
16
|
+
`$ xano tenant deploy_release t1234-abcd-xyz1 --release v1.0
|
|
17
|
+
Deployed release "v1.0" to tenant: My Tenant (my-tenant)
|
|
18
18
|
`,
|
|
19
|
-
`$ xano tenant deploy_release t1234-abcd-xyz1 --
|
|
19
|
+
`$ xano tenant deploy_release t1234-abcd-xyz1 --release v1.0 -o json`,
|
|
20
20
|
];
|
|
21
21
|
static flags = {
|
|
22
22
|
...BaseCommand.baseFlags,
|
|
@@ -27,8 +27,9 @@ Deployed release 10 to tenant: My Tenant (my-tenant)
|
|
|
27
27
|
options: ['summary', 'json'],
|
|
28
28
|
required: false,
|
|
29
29
|
}),
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
release: Flags.string({
|
|
31
|
+
char: 'r',
|
|
32
|
+
description: 'Release name to deploy',
|
|
32
33
|
required: true,
|
|
33
34
|
}),
|
|
34
35
|
workspace: Flags.string({
|
|
@@ -56,12 +57,12 @@ Deployed release 10 to tenant: My Tenant (my-tenant)
|
|
|
56
57
|
if (!workspaceId) {
|
|
57
58
|
this.error('No workspace ID provided. Use --workspace flag or set one in your profile.');
|
|
58
59
|
}
|
|
60
|
+
const releaseName = flags.release;
|
|
59
61
|
const tenantName = args.tenant_name;
|
|
60
|
-
const releaseId = flags.release_id;
|
|
61
62
|
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${tenantName}/deploy`;
|
|
62
63
|
try {
|
|
63
64
|
const response = await this.verboseFetch(apiUrl, {
|
|
64
|
-
body: JSON.stringify({
|
|
65
|
+
body: JSON.stringify({ release_name: releaseName }),
|
|
65
66
|
headers: {
|
|
66
67
|
accept: 'application/json',
|
|
67
68
|
Authorization: `Bearer ${profile.access_token}`,
|
|
@@ -78,7 +79,7 @@ Deployed release 10 to tenant: My Tenant (my-tenant)
|
|
|
78
79
|
this.log(JSON.stringify(tenant, null, 2));
|
|
79
80
|
}
|
|
80
81
|
else {
|
|
81
|
-
this.log(`Deployed release ${
|
|
82
|
+
this.log(`Deployed release "${releaseName}" to tenant: ${tenant.display || tenant.name} (${tenant.name})`);
|
|
82
83
|
if (tenant.state)
|
|
83
84
|
this.log(` State: ${tenant.state}`);
|
|
84
85
|
if (tenant.release?.name)
|