@xano/cli 0.0.32 → 0.0.33

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.
Files changed (27) hide show
  1. package/dist/commands/tenant/backup/create/index.d.ts +1 -4
  2. package/dist/commands/tenant/backup/create/index.js +8 -8
  3. package/dist/commands/tenant/backup/delete/index.d.ts +1 -4
  4. package/dist/commands/tenant/backup/delete/index.js +8 -8
  5. package/dist/commands/tenant/backup/export/index.d.ts +1 -4
  6. package/dist/commands/tenant/backup/export/index.js +11 -11
  7. package/dist/commands/tenant/backup/import/index.d.ts +1 -4
  8. package/dist/commands/tenant/backup/import/index.js +8 -8
  9. package/dist/commands/tenant/backup/list/index.d.ts +1 -4
  10. package/dist/commands/tenant/backup/list/index.js +9 -9
  11. package/dist/commands/tenant/backup/restore/index.d.ts +1 -4
  12. package/dist/commands/tenant/backup/restore/index.js +10 -10
  13. package/dist/commands/tenant/delete/index.d.ts +1 -4
  14. package/dist/commands/tenant/delete/index.js +13 -13
  15. package/dist/commands/tenant/deploy-platform/index.d.ts +1 -4
  16. package/dist/commands/tenant/deploy-platform/index.js +7 -7
  17. package/dist/commands/tenant/deploy-release/index.d.ts +1 -4
  18. package/dist/commands/tenant/deploy-release/index.js +6 -6
  19. package/dist/commands/tenant/edit/index.d.ts +1 -4
  20. package/dist/commands/tenant/edit/index.js +6 -6
  21. package/dist/commands/tenant/get/index.d.ts +1 -4
  22. package/dist/commands/tenant/get/index.js +8 -8
  23. package/dist/commands/tenant/list/index.js +1 -1
  24. package/dist/commands/workspace/create/index.d.ts +3 -1
  25. package/dist/commands/workspace/create/index.js +12 -11
  26. package/oclif.manifest.json +1799 -1802
  27. package/package.json +1 -1
@@ -6,22 +6,22 @@ import * as path from 'node:path';
6
6
  import BaseCommand from '../../../base-command.js';
7
7
  export default class TenantGet extends BaseCommand {
8
8
  static args = {
9
- tenant_id: Args.integer({
10
- description: 'Tenant ID to retrieve',
9
+ tenant_name: Args.string({
10
+ description: 'Tenant name to retrieve',
11
11
  required: true,
12
12
  }),
13
13
  };
14
14
  static description = 'Get details of a specific tenant';
15
15
  static examples = [
16
- `$ xano tenant get 42
17
- Tenant: My Tenant (my-tenant) - ID: 42
16
+ `$ xano tenant get t1234-abcd-xyz1
17
+ Tenant: My Tenant (my-tenant)
18
18
  State: ok
19
19
  License: tier1
20
20
  Domain: my-tenant.xano.io
21
21
  Cluster: default
22
22
  Release: v1.0
23
23
  `,
24
- `$ xano tenant get 42 -w 5 -o json`,
24
+ `$ xano tenant get t1234-abcd-xyz1 -w 5 -o json`,
25
25
  ];
26
26
  static flags = {
27
27
  ...BaseCommand.baseFlags,
@@ -57,8 +57,8 @@ Tenant: My Tenant (my-tenant) - ID: 42
57
57
  if (!workspaceId) {
58
58
  this.error('No workspace ID provided. Use --workspace flag or set one in your profile.');
59
59
  }
60
- const tenantId = args.tenant_id;
61
- const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${tenantId}`;
60
+ const tenantName = args.tenant_name;
61
+ const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${tenantName}`;
62
62
  try {
63
63
  const response = await this.verboseFetch(apiUrl, {
64
64
  headers: {
@@ -76,7 +76,7 @@ Tenant: My Tenant (my-tenant) - ID: 42
76
76
  this.log(JSON.stringify(tenant, null, 2));
77
77
  }
78
78
  else {
79
- this.log(`Tenant: ${tenant.display || tenant.name} (${tenant.name}) - ID: ${tenant.id}`);
79
+ this.log(`Tenant: ${tenant.display || tenant.name} (${tenant.name})`);
80
80
  if (tenant.state)
81
81
  this.log(` State: ${tenant.state}`);
82
82
  if (tenant.license)
@@ -87,7 +87,7 @@ Tenants in workspace 5:
87
87
  for (const tenant of tenants) {
88
88
  const state = tenant.state ? ` [${tenant.state}]` : '';
89
89
  const license = tenant.license ? ` - ${tenant.license}` : '';
90
- this.log(` - ${tenant.display || tenant.name} (${tenant.name}) (ID: ${tenant.id})${state}${license}`);
90
+ this.log(` - ${tenant.display || tenant.name} (${tenant.name})${state}${license}`);
91
91
  }
92
92
  }
93
93
  }
@@ -1,10 +1,12 @@
1
1
  import BaseCommand from '../../../base-command.js';
2
2
  export default class WorkspaceCreate extends BaseCommand {
3
+ static args: {
4
+ name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
+ };
3
6
  static description: string;
4
7
  static examples: string[];
5
8
  static flags: {
6
9
  description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
- name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
8
10
  output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
11
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
12
  verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
@@ -1,20 +1,26 @@
1
- import { Flags } from '@oclif/core';
1
+ import { Args, Flags } from '@oclif/core';
2
2
  import * as yaml from 'js-yaml';
3
3
  import * as fs from 'node:fs';
4
4
  import * as os from 'node:os';
5
5
  import * as path from 'node:path';
6
6
  import BaseCommand from '../../../base-command.js';
7
7
  export default class WorkspaceCreate extends BaseCommand {
8
+ static args = {
9
+ name: Args.string({
10
+ description: 'Name of the workspace',
11
+ required: true,
12
+ }),
13
+ };
8
14
  static description = 'Create a new workspace via the Xano Metadata API';
9
15
  static examples = [
10
- `$ xano workspace create --name "my-workspace"
16
+ `$ xano workspace create my-workspace
11
17
  Created workspace: my-workspace (ID: 123)
12
18
  `,
13
- `$ xano workspace create --name "my-app" --description "My application workspace"
19
+ `$ xano workspace create my-app --description "My application workspace"
14
20
  Created workspace: my-app (ID: 456)
15
21
  Description: My application workspace
16
22
  `,
17
- `$ xano workspace create -n "new-project" -d "New project workspace" -o json
23
+ `$ xano workspace create new-project -d "New project workspace" -o json
18
24
  {
19
25
  "id": 789,
20
26
  "name": "new-project",
@@ -29,11 +35,6 @@ Created workspace: my-app (ID: 456)
29
35
  description: 'Description for the workspace',
30
36
  required: false,
31
37
  }),
32
- name: Flags.string({
33
- char: 'n',
34
- description: 'Name of the workspace',
35
- required: true,
36
- }),
37
38
  output: Flags.string({
38
39
  char: 'o',
39
40
  default: 'summary',
@@ -43,7 +44,7 @@ Created workspace: my-app (ID: 456)
43
44
  }),
44
45
  };
45
46
  async run() {
46
- const { flags } = await this.parse(WorkspaceCreate);
47
+ const { args, flags } = await this.parse(WorkspaceCreate);
47
48
  // Get profile name (default or from flag/env)
48
49
  const profileName = flags.profile || this.getDefaultProfile();
49
50
  // Load credentials
@@ -65,7 +66,7 @@ Created workspace: my-app (ID: 456)
65
66
  const apiUrl = `${profile.instance_origin}/api:meta/workspace`;
66
67
  // Build request body
67
68
  const body = {
68
- name: flags.name,
69
+ name: args.name,
69
70
  };
70
71
  if (flags.description) {
71
72
  body.description = flags.description;