@xano/cli 0.0.95-beta.19 → 0.0.95-beta.20

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.
@@ -8,6 +8,7 @@ export default class TenantDeployRelease extends BaseCommand {
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
+ transaction: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
12
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
13
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
14
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
@@ -16,6 +16,7 @@ export default class TenantDeployRelease extends BaseCommand {
16
16
  `$ xano tenant deploy_release t1234-abcd-xyz1 --release v1.0
17
17
  Deployed release "v1.0" to tenant: My Tenant (my-tenant)
18
18
  `,
19
+ `$ xano tenant deploy_release t1234-abcd-xyz1 --release v1.0 --no-transaction`,
19
20
  `$ xano tenant deploy_release t1234-abcd-xyz1 --release v1.0 -o json`,
20
21
  ];
21
22
  static flags = {
@@ -32,6 +33,12 @@ Deployed release "v1.0" to tenant: My Tenant (my-tenant)
32
33
  description: 'Release name to deploy',
33
34
  required: true,
34
35
  }),
36
+ transaction: Flags.boolean({
37
+ allowNo: true,
38
+ default: true,
39
+ description: 'Wrap deployment in a database transaction (use --no-transaction to disable)',
40
+ required: false,
41
+ }),
35
42
  workspace: Flags.string({
36
43
  char: 'w',
37
44
  description: 'Workspace ID (uses profile workspace if not provided)',
@@ -64,7 +71,7 @@ Deployed release "v1.0" to tenant: My Tenant (my-tenant)
64
71
  const startTime = Date.now();
65
72
  try {
66
73
  const response = await this.verboseFetch(apiUrl, {
67
- body: JSON.stringify({ release_name: releaseName }),
74
+ body: JSON.stringify({ release_name: releaseName, transaction: flags.transaction }),
68
75
  headers: {
69
76
  accept: 'application/json',
70
77
  Authorization: `Bearer ${profile.access_token}`,
@@ -87,6 +94,7 @@ Deployed release "v1.0" to tenant: My Tenant (my-tenant)
87
94
  this.log(` State: ${tenant.state}`);
88
95
  if (tenant.release?.name)
89
96
  this.log(` Release: ${tenant.release.name}`);
97
+ this.log(` Transaction: ${flags.transaction ? 'enabled' : 'disabled'}`);
90
98
  this.log(` Time: ${elapsed}s`);
91
99
  }
92
100
  }