@xano/cli 0.0.95-beta.9 → 1.0.0
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 +111 -70
- package/dist/base-command.d.ts +16 -1
- package/dist/base-command.js +57 -5
- package/dist/commands/auth/index.d.ts +1 -0
- package/dist/commands/auth/index.js +15 -10
- package/dist/commands/branch/create/index.d.ts +4 -1
- package/dist/commands/branch/create/index.js +22 -21
- package/dist/commands/branch/delete/index.d.ts +1 -0
- package/dist/commands/branch/delete/index.js +1 -4
- package/dist/commands/branch/edit/index.d.ts +1 -0
- package/dist/commands/branch/edit/index.js +1 -4
- package/dist/commands/branch/get/index.d.ts +1 -0
- package/dist/commands/branch/get/index.js +1 -4
- package/dist/commands/branch/list/index.d.ts +2 -6
- package/dist/commands/branch/list/index.js +13 -17
- package/dist/commands/branch/set_live/index.d.ts +1 -0
- package/dist/commands/branch/set_live/index.js +1 -4
- package/dist/commands/function/create/index.d.ts +1 -0
- package/dist/commands/function/create/index.js +1 -2
- package/dist/commands/function/edit/index.d.ts +1 -0
- package/dist/commands/function/edit/index.js +1 -2
- package/dist/commands/function/get/index.d.ts +1 -0
- package/dist/commands/function/get/index.js +1 -4
- package/dist/commands/function/list/index.d.ts +1 -0
- package/dist/commands/function/list/index.js +1 -4
- package/dist/commands/platform/get/index.d.ts +1 -0
- package/dist/commands/platform/get/index.js +1 -4
- package/dist/commands/platform/list/index.d.ts +1 -0
- package/dist/commands/platform/list/index.js +1 -4
- package/dist/commands/profile/create/index.d.ts +1 -0
- package/dist/commands/profile/create/index.js +10 -4
- package/dist/commands/profile/delete/index.d.ts +1 -0
- package/dist/commands/profile/delete/index.js +8 -4
- package/dist/commands/profile/edit/index.d.ts +1 -0
- package/dist/commands/profile/edit/index.js +1 -4
- package/dist/commands/profile/get/index.d.ts +3 -0
- package/dist/commands/profile/get/index.js +12 -5
- package/dist/commands/profile/list/index.d.ts +1 -0
- package/dist/commands/profile/list/index.js +8 -4
- package/dist/commands/profile/me/index.d.ts +1 -0
- package/dist/commands/profile/me/index.js +1 -4
- package/dist/commands/profile/set/index.d.ts +3 -0
- package/dist/commands/profile/set/index.js +12 -6
- package/dist/commands/profile/token/index.d.ts +3 -0
- package/dist/commands/profile/token/index.js +12 -5
- package/dist/commands/profile/wizard/index.d.ts +1 -0
- package/dist/commands/profile/wizard/index.js +13 -9
- package/dist/commands/profile/workspace/index.d.ts +3 -0
- package/dist/commands/profile/workspace/index.js +12 -5
- package/dist/commands/profile/workspace/set/index.d.ts +1 -0
- package/dist/commands/profile/workspace/set/index.js +1 -3
- package/dist/commands/release/create/index.d.ts +4 -1
- package/dist/commands/release/create/index.js +12 -14
- package/dist/commands/release/delete/index.d.ts +1 -0
- package/dist/commands/release/delete/index.js +1 -4
- package/dist/commands/release/deploy/index.d.ts +3 -0
- package/dist/commands/release/deploy/index.js +31 -1
- package/dist/commands/release/edit/index.d.ts +1 -0
- package/dist/commands/release/edit/index.js +1 -4
- package/dist/commands/release/export/index.d.ts +1 -0
- package/dist/commands/release/export/index.js +1 -3
- package/dist/commands/release/get/index.d.ts +1 -0
- package/dist/commands/release/get/index.js +1 -4
- package/dist/commands/release/import/index.d.ts +1 -0
- package/dist/commands/release/import/index.js +1 -3
- package/dist/commands/release/list/index.d.ts +1 -0
- package/dist/commands/release/list/index.js +1 -4
- package/dist/commands/release/pull/index.d.ts +2 -3
- package/dist/commands/release/pull/index.js +19 -18
- package/dist/commands/release/push/index.d.ts +2 -3
- package/dist/commands/release/push/index.js +19 -22
- package/dist/commands/sandbox/delete/index.d.ts +13 -0
- package/dist/commands/sandbox/delete/index.js +71 -0
- package/dist/commands/sandbox/env/delete/index.d.ts +1 -0
- package/dist/commands/sandbox/env/delete/index.js +4 -2
- package/dist/commands/sandbox/env/get/index.d.ts +1 -0
- package/dist/commands/sandbox/env/get/index.js +4 -2
- package/dist/commands/sandbox/env/get_all/index.d.ts +1 -0
- package/dist/commands/sandbox/env/get_all/index.js +4 -2
- package/dist/commands/sandbox/env/list/index.d.ts +1 -0
- package/dist/commands/sandbox/env/list/index.js +4 -2
- package/dist/commands/sandbox/env/set/index.d.ts +1 -0
- package/dist/commands/sandbox/env/set/index.js +4 -2
- package/dist/commands/sandbox/env/set_all/index.d.ts +1 -0
- package/dist/commands/sandbox/env/set_all/index.js +4 -2
- package/dist/commands/sandbox/get/index.d.ts +1 -0
- package/dist/commands/sandbox/get/index.js +2 -0
- package/dist/commands/sandbox/license/get/index.d.ts +1 -0
- package/dist/commands/sandbox/license/get/index.js +4 -2
- package/dist/commands/sandbox/license/set/index.d.ts +1 -0
- package/dist/commands/sandbox/license/set/index.js +4 -2
- package/dist/commands/sandbox/pull/index.d.ts +2 -3
- package/dist/commands/sandbox/pull/index.js +19 -14
- package/dist/commands/sandbox/push/index.d.ts +12 -4
- package/dist/commands/sandbox/push/index.js +150 -95
- package/dist/commands/sandbox/reset/index.d.ts +1 -0
- package/dist/commands/sandbox/reset/index.js +4 -2
- package/dist/commands/sandbox/review/index.d.ts +1 -0
- package/dist/commands/sandbox/review/index.js +4 -2
- package/dist/commands/sandbox/unit_test/list/index.d.ts +1 -0
- package/dist/commands/sandbox/unit_test/list/index.js +4 -2
- package/dist/commands/sandbox/unit_test/run/index.d.ts +1 -0
- package/dist/commands/sandbox/unit_test/run/index.js +4 -2
- package/dist/commands/sandbox/unit_test/run_all/index.d.ts +1 -0
- package/dist/commands/sandbox/unit_test/run_all/index.js +4 -0
- package/dist/commands/sandbox/workflow_test/list/index.d.ts +1 -0
- package/dist/commands/sandbox/workflow_test/list/index.js +4 -2
- package/dist/commands/sandbox/workflow_test/run/index.d.ts +1 -0
- package/dist/commands/sandbox/workflow_test/run/index.js +4 -2
- package/dist/commands/sandbox/workflow_test/run_all/index.d.ts +1 -0
- package/dist/commands/sandbox/workflow_test/run_all/index.js +4 -0
- package/dist/commands/static_host/build/create/index.d.ts +1 -0
- package/dist/commands/static_host/build/create/index.js +1 -3
- package/dist/commands/static_host/build/get/index.d.ts +1 -0
- package/dist/commands/static_host/build/get/index.js +1 -4
- package/dist/commands/static_host/build/list/index.d.ts +1 -0
- package/dist/commands/static_host/build/list/index.js +1 -4
- package/dist/commands/static_host/list/index.d.ts +1 -0
- package/dist/commands/static_host/list/index.js +1 -4
- package/dist/commands/tenant/backup/create/index.d.ts +1 -0
- package/dist/commands/tenant/backup/create/index.js +1 -4
- package/dist/commands/tenant/backup/delete/index.d.ts +1 -0
- package/dist/commands/tenant/backup/delete/index.js +1 -4
- package/dist/commands/tenant/backup/export/index.d.ts +1 -0
- package/dist/commands/tenant/backup/export/index.js +1 -3
- package/dist/commands/tenant/backup/import/index.d.ts +1 -0
- package/dist/commands/tenant/backup/import/index.js +1 -3
- package/dist/commands/tenant/backup/list/index.d.ts +1 -0
- package/dist/commands/tenant/backup/list/index.js +1 -4
- package/dist/commands/tenant/backup/restore/index.d.ts +1 -0
- package/dist/commands/tenant/backup/restore/index.js +1 -4
- package/dist/commands/tenant/cluster/create/index.d.ts +1 -0
- package/dist/commands/tenant/cluster/create/index.js +1 -3
- package/dist/commands/tenant/cluster/delete/index.d.ts +1 -0
- package/dist/commands/tenant/cluster/delete/index.js +1 -4
- package/dist/commands/tenant/cluster/edit/index.d.ts +1 -0
- package/dist/commands/tenant/cluster/edit/index.js +1 -4
- package/dist/commands/tenant/cluster/get/index.d.ts +1 -0
- package/dist/commands/tenant/cluster/get/index.js +1 -4
- package/dist/commands/tenant/cluster/license/get/index.d.ts +1 -0
- package/dist/commands/tenant/cluster/license/get/index.js +1 -3
- package/dist/commands/tenant/cluster/license/set/index.d.ts +1 -0
- package/dist/commands/tenant/cluster/license/set/index.js +1 -3
- package/dist/commands/tenant/cluster/list/index.d.ts +1 -0
- package/dist/commands/tenant/cluster/list/index.js +1 -4
- package/dist/commands/tenant/create/index.d.ts +1 -0
- package/dist/commands/tenant/create/index.js +1 -3
- package/dist/commands/tenant/delete/index.d.ts +1 -0
- package/dist/commands/tenant/delete/index.js +1 -4
- package/dist/commands/tenant/deploy_platform/index.d.ts +1 -0
- package/dist/commands/tenant/deploy_platform/index.js +1 -3
- package/dist/commands/tenant/deploy_release/index.d.ts +1 -0
- package/dist/commands/tenant/deploy_release/index.js +1 -4
- package/dist/commands/tenant/edit/index.d.ts +1 -0
- package/dist/commands/tenant/edit/index.js +1 -4
- package/dist/commands/tenant/env/delete/index.d.ts +1 -0
- package/dist/commands/tenant/env/delete/index.js +1 -4
- package/dist/commands/tenant/env/get/index.d.ts +1 -0
- package/dist/commands/tenant/env/get/index.js +1 -4
- package/dist/commands/tenant/env/get_all/index.d.ts +1 -0
- package/dist/commands/tenant/env/get_all/index.js +1 -3
- package/dist/commands/tenant/env/list/index.d.ts +1 -0
- package/dist/commands/tenant/env/list/index.js +1 -4
- package/dist/commands/tenant/env/set/index.d.ts +1 -0
- package/dist/commands/tenant/env/set/index.js +1 -4
- package/dist/commands/tenant/env/set_all/index.d.ts +1 -0
- package/dist/commands/tenant/env/set_all/index.js +1 -3
- package/dist/commands/tenant/get/index.d.ts +1 -0
- package/dist/commands/tenant/get/index.js +1 -4
- package/dist/commands/tenant/impersonate/index.d.ts +1 -0
- package/dist/commands/tenant/impersonate/index.js +1 -4
- package/dist/commands/tenant/license/get/index.d.ts +1 -0
- package/dist/commands/tenant/license/get/index.js +1 -3
- package/dist/commands/tenant/license/set/index.d.ts +1 -0
- package/dist/commands/tenant/license/set/index.js +1 -3
- package/dist/commands/tenant/list/index.d.ts +1 -0
- package/dist/commands/tenant/list/index.js +1 -4
- package/dist/commands/tenant/pull/index.d.ts +2 -3
- package/dist/commands/tenant/pull/index.js +20 -21
- package/dist/commands/tenant/push/index.d.ts +2 -22
- package/dist/commands/tenant/push/index.js +7 -225
- package/dist/commands/tenant/unit_test/list/index.d.ts +1 -0
- package/dist/commands/tenant/unit_test/list/index.js +2 -27
- package/dist/commands/tenant/unit_test/run/index.d.ts +1 -0
- package/dist/commands/tenant/unit_test/run/index.js +2 -27
- package/dist/commands/tenant/unit_test/run_all/index.d.ts +1 -0
- package/dist/commands/tenant/unit_test/run_all/index.js +2 -27
- package/dist/commands/tenant/workflow_test/list/index.d.ts +1 -0
- package/dist/commands/tenant/workflow_test/list/index.js +2 -27
- package/dist/commands/tenant/workflow_test/run/index.d.ts +1 -0
- package/dist/commands/tenant/workflow_test/run/index.js +2 -27
- package/dist/commands/tenant/workflow_test/run_all/index.d.ts +1 -0
- package/dist/commands/tenant/workflow_test/run_all/index.js +2 -27
- package/dist/commands/unit_test/list/index.d.ts +1 -0
- package/dist/commands/unit_test/list/index.js +1 -4
- package/dist/commands/unit_test/run/index.d.ts +1 -0
- package/dist/commands/unit_test/run/index.js +1 -4
- package/dist/commands/unit_test/run_all/index.d.ts +1 -0
- package/dist/commands/unit_test/run_all/index.js +1 -4
- package/dist/commands/update/index.d.ts +1 -0
- package/dist/commands/workflow_test/delete/index.d.ts +1 -0
- package/dist/commands/workflow_test/delete/index.js +1 -4
- package/dist/commands/workflow_test/get/index.d.ts +1 -0
- package/dist/commands/workflow_test/get/index.js +1 -4
- package/dist/commands/workflow_test/list/index.d.ts +1 -0
- package/dist/commands/workflow_test/list/index.js +1 -4
- package/dist/commands/workflow_test/run/index.d.ts +1 -0
- package/dist/commands/workflow_test/run/index.js +1 -4
- package/dist/commands/workflow_test/run_all/index.d.ts +1 -0
- package/dist/commands/workflow_test/run_all/index.js +1 -4
- package/dist/commands/workspace/create/index.d.ts +1 -0
- package/dist/commands/workspace/create/index.js +1 -4
- package/dist/commands/workspace/delete/index.d.ts +2 -6
- package/dist/commands/workspace/delete/index.js +17 -16
- package/dist/commands/workspace/edit/index.d.ts +2 -6
- package/dist/commands/workspace/edit/index.js +16 -20
- package/dist/commands/workspace/get/index.d.ts +2 -6
- package/dist/commands/workspace/get/index.js +14 -18
- package/dist/commands/workspace/git/pull/index.d.ts +2 -3
- package/dist/commands/workspace/git/pull/index.js +18 -17
- package/dist/commands/workspace/list/index.d.ts +1 -0
- package/dist/commands/workspace/list/index.js +1 -4
- package/dist/commands/workspace/pull/index.d.ts +2 -3
- package/dist/commands/workspace/pull/index.js +21 -24
- package/dist/commands/workspace/push/index.d.ts +7 -16
- package/dist/commands/workspace/push/index.js +85 -700
- package/dist/utils/multidoc-push.d.ts +63 -0
- package/dist/utils/multidoc-push.js +690 -0
- package/dist/utils/reference-checker.d.ts +57 -0
- package/dist/utils/reference-checker.js +232 -0
- package/oclif.manifest.json +3562 -2647
- package/package.json +1 -1
- package/dist/commands/sandbox/workflow_test/delete/index.d.ts +0 -17
- package/dist/commands/sandbox/workflow_test/delete/index.js +0 -59
- package/dist/commands/sandbox/workflow_test/get/index.d.ts +0 -17
- package/dist/commands/sandbox/workflow_test/get/index.js +0 -58
- package/dist/commands/tenant/workflow_test/delete/index.d.ts +0 -19
- package/dist/commands/tenant/workflow_test/delete/index.js +0 -110
- package/dist/commands/tenant/workflow_test/get/index.d.ts +0 -19
- package/dist/commands/tenant/workflow_test/get/index.js +0 -112
|
@@ -57,39 +57,14 @@ Unit tests for tenant my-tenant:
|
|
|
57
57
|
if (!workspaceId) {
|
|
58
58
|
this.error('No workspace ID provided. Use --workspace flag or set one in your profile.');
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
const tenantUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${encodeURIComponent(flags.tenant)}`;
|
|
62
|
-
let tenantWorkspaceId;
|
|
63
|
-
try {
|
|
64
|
-
const tenantResponse = await this.verboseFetch(tenantUrl, {
|
|
65
|
-
headers: {
|
|
66
|
-
accept: 'application/json',
|
|
67
|
-
Authorization: `Bearer ${profile.access_token}`,
|
|
68
|
-
},
|
|
69
|
-
method: 'GET',
|
|
70
|
-
}, flags.verbose, profile.access_token);
|
|
71
|
-
if (!tenantResponse.ok) {
|
|
72
|
-
const errorText = await tenantResponse.text();
|
|
73
|
-
this.error(`Failed to find tenant '${flags.tenant}': ${tenantResponse.status}\n${errorText}`);
|
|
74
|
-
}
|
|
75
|
-
const tenant = (await tenantResponse.json());
|
|
76
|
-
tenantWorkspaceId = String(tenant.workspace?.id || workspaceId);
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
if (error instanceof Error) {
|
|
80
|
-
this.error(`Failed to resolve tenant: ${error.message}`);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
this.error(`Failed to resolve tenant: ${String(error)}`);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
60
|
+
const tenantName = encodeURIComponent(flags.tenant);
|
|
86
61
|
const params = new URLSearchParams();
|
|
87
62
|
params.set('per_page', '10000');
|
|
88
63
|
if (flags.branch)
|
|
89
64
|
params.set('branch', flags.branch);
|
|
90
65
|
if (flags['obj-type'])
|
|
91
66
|
params.set('obj_type', flags['obj-type']);
|
|
92
|
-
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${
|
|
67
|
+
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${tenantName}/unit_test?${params}`;
|
|
93
68
|
try {
|
|
94
69
|
const response = await this.verboseFetch(apiUrl, {
|
|
95
70
|
headers: {
|
|
@@ -9,6 +9,7 @@ export default class TenantUnitTestRun extends BaseCommand {
|
|
|
9
9
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
tenant: 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
|
+
config: 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>;
|
|
14
15
|
};
|
|
@@ -53,33 +53,8 @@ Result: PASS
|
|
|
53
53
|
if (!workspaceId) {
|
|
54
54
|
this.error('No workspace ID provided. Use --workspace flag or set one in your profile.');
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
let tenantWorkspaceId;
|
|
59
|
-
try {
|
|
60
|
-
const tenantResponse = await this.verboseFetch(tenantUrl, {
|
|
61
|
-
headers: {
|
|
62
|
-
accept: 'application/json',
|
|
63
|
-
Authorization: `Bearer ${profile.access_token}`,
|
|
64
|
-
},
|
|
65
|
-
method: 'GET',
|
|
66
|
-
}, flags.verbose, profile.access_token);
|
|
67
|
-
if (!tenantResponse.ok) {
|
|
68
|
-
const errorText = await tenantResponse.text();
|
|
69
|
-
this.error(`Failed to find tenant '${flags.tenant}': ${tenantResponse.status}\n${errorText}`);
|
|
70
|
-
}
|
|
71
|
-
const tenant = (await tenantResponse.json());
|
|
72
|
-
tenantWorkspaceId = String(tenant.workspace?.id || workspaceId);
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
if (error instanceof Error) {
|
|
76
|
-
this.error(`Failed to resolve tenant: ${error.message}`);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
this.error(`Failed to resolve tenant: ${String(error)}`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${tenantWorkspaceId}/unit_test/${encodeURIComponent(args.unit_test_id)}/run`;
|
|
56
|
+
const tenantName = encodeURIComponent(flags.tenant);
|
|
57
|
+
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${tenantName}/unit_test/${encodeURIComponent(args.unit_test_id)}/run`;
|
|
83
58
|
try {
|
|
84
59
|
if (flags.output === 'summary') {
|
|
85
60
|
this.log(`Running unit test ${args.unit_test_id}...`);
|
|
@@ -8,6 +8,7 @@ export default class TenantUnitTestRunAll extends BaseCommand {
|
|
|
8
8
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
tenant: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
@@ -62,33 +62,8 @@ Results: 4 passed, 1 failed
|
|
|
62
62
|
if (!workspaceId) {
|
|
63
63
|
this.error('No workspace ID provided. Use --workspace flag or set one in your profile.');
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
let tenantWorkspaceId;
|
|
68
|
-
try {
|
|
69
|
-
const tenantResponse = await this.verboseFetch(tenantUrl, {
|
|
70
|
-
headers: {
|
|
71
|
-
accept: 'application/json',
|
|
72
|
-
Authorization: `Bearer ${profile.access_token}`,
|
|
73
|
-
},
|
|
74
|
-
method: 'GET',
|
|
75
|
-
}, flags.verbose, profile.access_token);
|
|
76
|
-
if (!tenantResponse.ok) {
|
|
77
|
-
const errorText = await tenantResponse.text();
|
|
78
|
-
this.error(`Failed to find tenant '${flags.tenant}': ${tenantResponse.status}\n${errorText}`);
|
|
79
|
-
}
|
|
80
|
-
const tenant = (await tenantResponse.json());
|
|
81
|
-
tenantWorkspaceId = String(tenant.workspace?.id || workspaceId);
|
|
82
|
-
}
|
|
83
|
-
catch (error) {
|
|
84
|
-
if (error instanceof Error) {
|
|
85
|
-
this.error(`Failed to resolve tenant: ${error.message}`);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
this.error(`Failed to resolve tenant: ${String(error)}`);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
const baseUrl = `${profile.instance_origin}/api:meta/workspace/${tenantWorkspaceId}/unit_test`;
|
|
65
|
+
const tenantName = encodeURIComponent(flags.tenant);
|
|
66
|
+
const baseUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${tenantName}/unit_test`;
|
|
92
67
|
try {
|
|
93
68
|
const listParams = new URLSearchParams();
|
|
94
69
|
listParams.set('per_page', '10000');
|
|
@@ -7,6 +7,7 @@ export default class TenantWorkflowTestList extends BaseCommand {
|
|
|
7
7
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
tenant: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
};
|
|
@@ -52,37 +52,12 @@ Workflow tests for tenant my-tenant:
|
|
|
52
52
|
if (!workspaceId) {
|
|
53
53
|
this.error('No workspace ID provided. Use --workspace flag or set one in your profile.');
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
const tenantUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${encodeURIComponent(flags.tenant)}`;
|
|
57
|
-
let tenantWorkspaceId;
|
|
58
|
-
try {
|
|
59
|
-
const tenantResponse = await this.verboseFetch(tenantUrl, {
|
|
60
|
-
headers: {
|
|
61
|
-
accept: 'application/json',
|
|
62
|
-
Authorization: `Bearer ${profile.access_token}`,
|
|
63
|
-
},
|
|
64
|
-
method: 'GET',
|
|
65
|
-
}, flags.verbose, profile.access_token);
|
|
66
|
-
if (!tenantResponse.ok) {
|
|
67
|
-
const errorText = await tenantResponse.text();
|
|
68
|
-
this.error(`Failed to find tenant '${flags.tenant}': ${tenantResponse.status}\n${errorText}`);
|
|
69
|
-
}
|
|
70
|
-
const tenant = (await tenantResponse.json());
|
|
71
|
-
tenantWorkspaceId = String(tenant.workspace?.id || workspaceId);
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
if (error instanceof Error) {
|
|
75
|
-
this.error(`Failed to resolve tenant: ${error.message}`);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
this.error(`Failed to resolve tenant: ${String(error)}`);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
55
|
+
const tenantName = encodeURIComponent(flags.tenant);
|
|
81
56
|
const params = new URLSearchParams();
|
|
82
57
|
params.set('per_page', '10000');
|
|
83
58
|
if (flags.branch)
|
|
84
59
|
params.set('branch', flags.branch);
|
|
85
|
-
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${
|
|
60
|
+
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${tenantName}/workflow_test?${params}`;
|
|
86
61
|
try {
|
|
87
62
|
const response = await this.verboseFetch(apiUrl, {
|
|
88
63
|
headers: {
|
|
@@ -12,6 +12,7 @@ export default class TenantWorkflowTestRun extends BaseCommand {
|
|
|
12
12
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
tenant: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
14
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
16
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
17
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
};
|
|
@@ -53,33 +53,8 @@ Result: PASS (0.25s)
|
|
|
53
53
|
if (!workspaceId) {
|
|
54
54
|
this.error('No workspace ID provided. Use --workspace flag or set one in your profile.');
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
let tenantWorkspaceId;
|
|
59
|
-
try {
|
|
60
|
-
const tenantResponse = await this.verboseFetch(tenantUrl, {
|
|
61
|
-
headers: {
|
|
62
|
-
accept: 'application/json',
|
|
63
|
-
Authorization: `Bearer ${profile.access_token}`,
|
|
64
|
-
},
|
|
65
|
-
method: 'GET',
|
|
66
|
-
}, flags.verbose, profile.access_token);
|
|
67
|
-
if (!tenantResponse.ok) {
|
|
68
|
-
const errorText = await tenantResponse.text();
|
|
69
|
-
this.error(`Failed to find tenant '${flags.tenant}': ${tenantResponse.status}\n${errorText}`);
|
|
70
|
-
}
|
|
71
|
-
const tenant = (await tenantResponse.json());
|
|
72
|
-
tenantWorkspaceId = String(tenant.workspace?.id || workspaceId);
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
if (error instanceof Error) {
|
|
76
|
-
this.error(`Failed to resolve tenant: ${error.message}`);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
this.error(`Failed to resolve tenant: ${String(error)}`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${tenantWorkspaceId}/workflow_test/${args.workflow_test_id}/run`;
|
|
56
|
+
const tenantName = encodeURIComponent(flags.tenant);
|
|
57
|
+
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${tenantName}/workflow_test/${args.workflow_test_id}/run`;
|
|
83
58
|
try {
|
|
84
59
|
if (flags.output === 'summary') {
|
|
85
60
|
this.log(`Running workflow test ${args.workflow_test_id}...`);
|
|
@@ -7,6 +7,7 @@ export default class TenantWorkflowTestRunAll extends BaseCommand {
|
|
|
7
7
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
tenant: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
};
|
|
@@ -57,33 +57,8 @@ Results: 2 passed, 1 failed
|
|
|
57
57
|
if (!workspaceId) {
|
|
58
58
|
this.error('No workspace ID provided. Use --workspace flag or set one in your profile.');
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
let tenantWorkspaceId;
|
|
63
|
-
try {
|
|
64
|
-
const tenantResponse = await this.verboseFetch(tenantUrl, {
|
|
65
|
-
headers: {
|
|
66
|
-
accept: 'application/json',
|
|
67
|
-
Authorization: `Bearer ${profile.access_token}`,
|
|
68
|
-
},
|
|
69
|
-
method: 'GET',
|
|
70
|
-
}, flags.verbose, profile.access_token);
|
|
71
|
-
if (!tenantResponse.ok) {
|
|
72
|
-
const errorText = await tenantResponse.text();
|
|
73
|
-
this.error(`Failed to find tenant '${flags.tenant}': ${tenantResponse.status}\n${errorText}`);
|
|
74
|
-
}
|
|
75
|
-
const tenant = (await tenantResponse.json());
|
|
76
|
-
tenantWorkspaceId = String(tenant.workspace?.id || workspaceId);
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
if (error instanceof Error) {
|
|
80
|
-
this.error(`Failed to resolve tenant: ${error.message}`);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
this.error(`Failed to resolve tenant: ${String(error)}`);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
const baseUrl = `${profile.instance_origin}/api:meta/workspace/${tenantWorkspaceId}/workflow_test`;
|
|
60
|
+
const tenantName = encodeURIComponent(flags.tenant);
|
|
61
|
+
const baseUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${tenantName}/workflow_test`;
|
|
87
62
|
try {
|
|
88
63
|
const listParams = new URLSearchParams();
|
|
89
64
|
listParams.set('per_page', '10000');
|
|
@@ -7,6 +7,7 @@ export default class UnitTestList extends BaseCommand {
|
|
|
7
7
|
'obj-type': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import * as yaml from 'js-yaml';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
|
-
import * as os from 'node:os';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
4
|
import BaseCommand from '../../../base-command.js';
|
|
7
5
|
export default class UnitTestList extends BaseCommand {
|
|
8
6
|
static description = 'List all unit tests in a workspace';
|
|
@@ -116,8 +114,7 @@ Unit tests in workspace 5:
|
|
|
116
114
|
}
|
|
117
115
|
}
|
|
118
116
|
loadCredentials() {
|
|
119
|
-
const
|
|
120
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
117
|
+
const credentialsPath = this.getCredentialsPath();
|
|
121
118
|
if (!fs.existsSync(credentialsPath)) {
|
|
122
119
|
this.error(`Credentials file not found at ${credentialsPath}\n` +
|
|
123
120
|
`Create a profile using 'xano profile create'`);
|
|
@@ -8,6 +8,7 @@ export default class UnitTestRun extends BaseCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import * as yaml from 'js-yaml';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
|
-
import * as os from 'node:os';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
4
|
import BaseCommand from '../../../base-command.js';
|
|
7
5
|
export default class UnitTestRun extends BaseCommand {
|
|
8
6
|
static args = {
|
|
@@ -100,8 +98,7 @@ Result: PASS
|
|
|
100
98
|
}
|
|
101
99
|
}
|
|
102
100
|
loadCredentials() {
|
|
103
|
-
const
|
|
104
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
101
|
+
const credentialsPath = this.getCredentialsPath();
|
|
105
102
|
if (!fs.existsSync(credentialsPath)) {
|
|
106
103
|
this.error(`Credentials file not found at ${credentialsPath}\n` +
|
|
107
104
|
`Create a profile using 'xano profile create'`);
|
|
@@ -7,6 +7,7 @@ export default class UnitTestRunAll extends BaseCommand {
|
|
|
7
7
|
'obj-type': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import * as yaml from 'js-yaml';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
|
-
import * as os from 'node:os';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
4
|
import BaseCommand from '../../../base-command.js';
|
|
7
5
|
export default class UnitTestRunAll extends BaseCommand {
|
|
8
6
|
static description = 'Run all unit tests in a workspace';
|
|
@@ -195,8 +193,7 @@ Results: 2 passed, 1 failed
|
|
|
195
193
|
}
|
|
196
194
|
}
|
|
197
195
|
loadCredentials() {
|
|
198
|
-
const
|
|
199
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
196
|
+
const credentialsPath = this.getCredentialsPath();
|
|
200
197
|
if (!fs.existsSync(credentialsPath)) {
|
|
201
198
|
this.error(`Credentials file not found at ${credentialsPath}\n` + `Create a profile using 'xano profile create'`);
|
|
202
199
|
}
|
|
@@ -5,6 +5,7 @@ export default class Update extends BaseCommand {
|
|
|
5
5
|
static flags: {
|
|
6
6
|
beta: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
check: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
9
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
11
|
};
|
|
@@ -12,6 +12,7 @@ export default class WorkflowTestDelete extends BaseCommand {
|
|
|
12
12
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
13
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
14
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
16
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
17
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
};
|
|
@@ -2,8 +2,6 @@ import { Args, Flags } from '@oclif/core';
|
|
|
2
2
|
import * as readline from 'node:readline';
|
|
3
3
|
import * as yaml from 'js-yaml';
|
|
4
4
|
import * as fs from 'node:fs';
|
|
5
|
-
import * as os from 'node:os';
|
|
6
|
-
import * as path from 'node:path';
|
|
7
5
|
import BaseCommand from '../../../base-command.js';
|
|
8
6
|
export default class WorkflowTestDelete extends BaseCommand {
|
|
9
7
|
static args = {
|
|
@@ -109,8 +107,7 @@ Deleted workflow test 1
|
|
|
109
107
|
});
|
|
110
108
|
}
|
|
111
109
|
loadCredentials() {
|
|
112
|
-
const
|
|
113
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
110
|
+
const credentialsPath = this.getCredentialsPath();
|
|
114
111
|
if (!fs.existsSync(credentialsPath)) {
|
|
115
112
|
this.error(`Credentials file not found at ${credentialsPath}\n` +
|
|
116
113
|
`Create a profile using 'xano profile create'`);
|
|
@@ -12,6 +12,7 @@ export default class WorkflowTestGet extends BaseCommand {
|
|
|
12
12
|
'include-draft': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
13
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
14
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
16
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
17
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
18
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import * as yaml from 'js-yaml';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
|
-
import * as os from 'node:os';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
4
|
import BaseCommand from '../../../base-command.js';
|
|
7
5
|
export default class WorkflowTestGet extends BaseCommand {
|
|
8
6
|
static args = {
|
|
@@ -121,8 +119,7 @@ Workflow Test: my-test (ID: 1)
|
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
121
|
loadCredentials() {
|
|
124
|
-
const
|
|
125
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
122
|
+
const credentialsPath = this.getCredentialsPath();
|
|
126
123
|
if (!fs.existsSync(credentialsPath)) {
|
|
127
124
|
this.error(`Credentials file not found at ${credentialsPath}\n` +
|
|
128
125
|
`Create a profile using 'xano profile create'`);
|
|
@@ -6,6 +6,7 @@ export default class WorkflowTestList extends BaseCommand {
|
|
|
6
6
|
branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
7
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
12
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import * as yaml from 'js-yaml';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
|
-
import * as os from 'node:os';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
4
|
import BaseCommand from '../../../base-command.js';
|
|
7
5
|
export default class WorkflowTestList extends BaseCommand {
|
|
8
6
|
static description = 'List all workflow tests in a workspace';
|
|
@@ -108,8 +106,7 @@ Workflow tests in workspace 5:
|
|
|
108
106
|
}
|
|
109
107
|
}
|
|
110
108
|
loadCredentials() {
|
|
111
|
-
const
|
|
112
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
109
|
+
const credentialsPath = this.getCredentialsPath();
|
|
113
110
|
if (!fs.existsSync(credentialsPath)) {
|
|
114
111
|
this.error(`Credentials file not found at ${credentialsPath}\n` +
|
|
115
112
|
`Create a profile using 'xano profile create'`);
|
|
@@ -11,6 +11,7 @@ export default class WorkflowTestRun extends BaseCommand {
|
|
|
11
11
|
static flags: {
|
|
12
12
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
13
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
16
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
17
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import * as yaml from 'js-yaml';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
|
-
import * as os from 'node:os';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
4
|
import BaseCommand from '../../../base-command.js';
|
|
7
5
|
export default class WorkflowTestRun extends BaseCommand {
|
|
8
6
|
static args = {
|
|
@@ -98,8 +96,7 @@ Result: PASS (1.234s)
|
|
|
98
96
|
}
|
|
99
97
|
}
|
|
100
98
|
loadCredentials() {
|
|
101
|
-
const
|
|
102
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
99
|
+
const credentialsPath = this.getCredentialsPath();
|
|
103
100
|
if (!fs.existsSync(credentialsPath)) {
|
|
104
101
|
this.error(`Credentials file not found at ${credentialsPath}\n` +
|
|
105
102
|
`Create a profile using 'xano profile create'`);
|
|
@@ -6,6 +6,7 @@ export default class WorkflowTestRunAll extends BaseCommand {
|
|
|
6
6
|
branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
7
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
11
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
12
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import * as yaml from 'js-yaml';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
|
-
import * as os from 'node:os';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
4
|
import BaseCommand from '../../../base-command.js';
|
|
7
5
|
export default class WorkflowTestRunAll extends BaseCommand {
|
|
8
6
|
static description = 'Run all workflow tests in a workspace';
|
|
@@ -183,8 +181,7 @@ Results: 2 passed, 1 failed (2.691s total)
|
|
|
183
181
|
}
|
|
184
182
|
}
|
|
185
183
|
loadCredentials() {
|
|
186
|
-
const
|
|
187
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
184
|
+
const credentialsPath = this.getCredentialsPath();
|
|
188
185
|
if (!fs.existsSync(credentialsPath)) {
|
|
189
186
|
this.error(`Credentials file not found at ${credentialsPath}\n` + `Create a profile using 'xano profile create'`);
|
|
190
187
|
}
|
|
@@ -8,6 +8,7 @@ export default class WorkspaceCreate extends BaseCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
12
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
13
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import * as yaml from 'js-yaml';
|
|
3
3
|
import * as fs from 'node:fs';
|
|
4
|
-
import * as os from 'node:os';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
4
|
import BaseCommand from '../../../base-command.js';
|
|
7
5
|
export default class WorkspaceCreate extends BaseCommand {
|
|
8
6
|
static args = {
|
|
@@ -109,8 +107,7 @@ Created workspace: my-app (ID: 456)
|
|
|
109
107
|
}
|
|
110
108
|
}
|
|
111
109
|
loadCredentials() {
|
|
112
|
-
const
|
|
113
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
110
|
+
const credentialsPath = this.getCredentialsPath();
|
|
114
111
|
// Check if credentials file exists
|
|
115
112
|
if (!fs.existsSync(credentialsPath)) {
|
|
116
113
|
this.error(`Credentials file not found at ${credentialsPath}\n` +
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import BaseCommand from '../../../base-command.js';
|
|
2
2
|
export default class WorkspaceDelete extends BaseCommand {
|
|
3
|
-
static args: {
|
|
4
|
-
workspace_id: import("@oclif/core/interfaces").Arg<number, {
|
|
5
|
-
max?: number;
|
|
6
|
-
min?: number;
|
|
7
|
-
}>;
|
|
8
|
-
};
|
|
9
3
|
static description: string;
|
|
10
4
|
static examples: string[];
|
|
11
5
|
static flags: {
|
|
12
6
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
7
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
10
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
11
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
12
|
};
|