@xano/cli 0.0.95-beta.20 → 0.0.95-beta.22
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 +13 -1
- package/dist/base-command.d.ts +11 -1
- package/dist/base-command.js +31 -3
- 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 +1 -0
- package/dist/commands/branch/create/index.js +1 -4
- 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 +1 -0
- package/dist/commands/branch/list/index.js +1 -4
- 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 +1 -0
- package/dist/commands/release/create/index.js +1 -4
- 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 +1 -0
- 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 +1 -0
- package/dist/commands/release/pull/index.js +1 -3
- package/dist/commands/release/push/index.d.ts +1 -0
- package/dist/commands/release/push/index.js +1 -3
- package/dist/commands/sandbox/delete/index.d.ts +1 -0
- package/dist/commands/sandbox/env/delete/index.d.ts +1 -0
- package/dist/commands/sandbox/env/get/index.d.ts +1 -0
- package/dist/commands/sandbox/env/get_all/index.d.ts +1 -0
- package/dist/commands/sandbox/env/list/index.d.ts +1 -0
- package/dist/commands/sandbox/env/set/index.d.ts +1 -0
- package/dist/commands/sandbox/env/set_all/index.d.ts +1 -0
- package/dist/commands/sandbox/get/index.d.ts +1 -0
- package/dist/commands/sandbox/license/get/index.d.ts +1 -0
- package/dist/commands/sandbox/license/set/index.d.ts +1 -0
- package/dist/commands/sandbox/pull/index.d.ts +1 -0
- package/dist/commands/sandbox/push/index.d.ts +1 -0
- package/dist/commands/sandbox/reset/index.d.ts +1 -0
- package/dist/commands/sandbox/review/index.d.ts +1 -0
- package/dist/commands/sandbox/unit_test/list/index.d.ts +1 -0
- package/dist/commands/sandbox/unit_test/run/index.d.ts +1 -0
- package/dist/commands/sandbox/unit_test/run_all/index.d.ts +1 -0
- package/dist/commands/sandbox/workflow_test/list/index.d.ts +1 -0
- package/dist/commands/sandbox/workflow_test/run/index.d.ts +1 -0
- package/dist/commands/sandbox/workflow_test/run_all/index.d.ts +1 -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 +1 -0
- package/dist/commands/tenant/pull/index.js +1 -3
- 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/run/index.d.ts +1 -0
- package/dist/commands/tenant/unit_test/run_all/index.d.ts +1 -0
- package/dist/commands/tenant/workflow_test/list/index.d.ts +1 -0
- package/dist/commands/tenant/workflow_test/run/index.d.ts +1 -0
- package/dist/commands/tenant/workflow_test/run_all/index.d.ts +1 -0
- 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 +1 -0
- package/dist/commands/workspace/delete/index.js +1 -4
- package/dist/commands/workspace/edit/index.d.ts +1 -0
- package/dist/commands/workspace/edit/index.js +1 -4
- package/dist/commands/workspace/get/index.d.ts +1 -0
- package/dist/commands/workspace/get/index.js +1 -4
- package/dist/commands/workspace/git/pull/index.d.ts +1 -0
- 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 +1 -0
- package/dist/commands/workspace/pull/index.js +1 -3
- package/dist/commands/workspace/push/index.d.ts +1 -0
- package/dist/commands/workspace/push/index.js +1 -3
- package/oclif.manifest.json +2526 -1482
- package/package.json +1 -1
|
@@ -1,228 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import * as os from 'node:os';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
|
-
import BaseCommand from '../../../base-command.js';
|
|
7
|
-
import { findFilesWithGuid } from '../../../utils/document-parser.js';
|
|
8
|
-
export default class Push extends BaseCommand {
|
|
9
|
-
static args = {
|
|
10
|
-
directory: Args.string({
|
|
11
|
-
description: 'Directory containing documents to push (as produced by tenant pull or workspace pull)',
|
|
12
|
-
required: true,
|
|
13
|
-
}),
|
|
14
|
-
};
|
|
15
|
-
static description = 'Push local documents to a tenant via the Xano Metadata API multidoc endpoint';
|
|
16
|
-
static examples = [
|
|
17
|
-
`$ xano tenant push ./my-workspace -t my-tenant
|
|
18
|
-
Pushed 42 documents to tenant my-tenant from ./my-workspace
|
|
19
|
-
`,
|
|
20
|
-
`$ xano tenant push ./output -t my-tenant -w 40
|
|
21
|
-
Pushed 15 documents to tenant my-tenant from ./output
|
|
22
|
-
`,
|
|
23
|
-
`$ xano tenant push ./backup -t my-tenant --profile production
|
|
24
|
-
Pushed 58 documents to tenant my-tenant from ./backup
|
|
25
|
-
`,
|
|
26
|
-
`$ xano tenant push ./my-workspace -t my-tenant --records
|
|
27
|
-
Include table records in import
|
|
28
|
-
`,
|
|
29
|
-
`$ xano tenant push ./my-workspace -t my-tenant --env
|
|
30
|
-
Include environment variables in import
|
|
31
|
-
`,
|
|
32
|
-
`$ xano tenant push ./my-workspace -t my-tenant --truncate
|
|
33
|
-
Truncate all table records before importing
|
|
34
|
-
`,
|
|
35
|
-
];
|
|
36
|
-
static flags = {
|
|
37
|
-
...BaseCommand.baseFlags,
|
|
38
|
-
env: Flags.boolean({
|
|
39
|
-
default: false,
|
|
40
|
-
description: 'Include environment variables in import',
|
|
41
|
-
required: false,
|
|
42
|
-
}),
|
|
43
|
-
records: Flags.boolean({
|
|
44
|
-
default: false,
|
|
45
|
-
description: 'Include records in import',
|
|
46
|
-
required: false,
|
|
47
|
-
}),
|
|
48
|
-
tenant: Flags.string({
|
|
49
|
-
char: 't',
|
|
50
|
-
description: 'Tenant name to push to',
|
|
51
|
-
required: true,
|
|
52
|
-
}),
|
|
53
|
-
transaction: Flags.boolean({
|
|
54
|
-
allowNo: true,
|
|
55
|
-
default: true,
|
|
56
|
-
description: 'Wrap import in a database transaction (use --no-transaction for debugging purposes)',
|
|
57
|
-
required: false,
|
|
58
|
-
}),
|
|
59
|
-
truncate: Flags.boolean({
|
|
60
|
-
default: false,
|
|
61
|
-
description: 'Truncate all table records before importing',
|
|
62
|
-
required: false,
|
|
63
|
-
}),
|
|
64
|
-
workspace: Flags.string({
|
|
65
|
-
char: 'w',
|
|
66
|
-
description: 'Workspace ID (optional if set in profile)',
|
|
67
|
-
required: false,
|
|
68
|
-
}),
|
|
69
|
-
};
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class Push extends Command {
|
|
3
|
+
static description = 'Direct tenant push is not supported. Deploy through a release or use the sandbox (xano sandbox push).';
|
|
70
4
|
async run() {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const credentials = this.loadCredentials();
|
|
76
|
-
// Get the profile configuration
|
|
77
|
-
if (!(profileName in credentials.profiles)) {
|
|
78
|
-
this.error(`Profile '${profileName}' not found. Available profiles: ${Object.keys(credentials.profiles).join(', ')}\n` +
|
|
79
|
-
`Create a profile using 'xano profile:create'`);
|
|
80
|
-
}
|
|
81
|
-
const profile = credentials.profiles[profileName];
|
|
82
|
-
// Validate required fields
|
|
83
|
-
if (!profile.instance_origin) {
|
|
84
|
-
this.error(`Profile '${profileName}' is missing instance_origin`);
|
|
85
|
-
}
|
|
86
|
-
if (!profile.access_token) {
|
|
87
|
-
this.error(`Profile '${profileName}' is missing access_token`);
|
|
88
|
-
}
|
|
89
|
-
// Determine workspace_id from flag or profile
|
|
90
|
-
let workspaceId;
|
|
91
|
-
if (flags.workspace) {
|
|
92
|
-
workspaceId = flags.workspace;
|
|
93
|
-
}
|
|
94
|
-
else if (profile.workspace) {
|
|
95
|
-
workspaceId = profile.workspace;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
this.error(`Workspace ID is required. Either:\n` +
|
|
99
|
-
` 1. Provide it as a flag: xano tenant push <directory> -t <tenant_name> -w <workspace_id>\n` +
|
|
100
|
-
` 2. Set it in your profile using: xano profile:edit ${profileName} -w <workspace_id>`);
|
|
101
|
-
}
|
|
102
|
-
const tenantName = flags.tenant;
|
|
103
|
-
// Resolve the input directory
|
|
104
|
-
const inputDir = path.resolve(args.directory);
|
|
105
|
-
if (!fs.existsSync(inputDir)) {
|
|
106
|
-
this.error(`Directory not found: ${inputDir}`);
|
|
107
|
-
}
|
|
108
|
-
if (!fs.statSync(inputDir).isDirectory()) {
|
|
109
|
-
this.error(`Not a directory: ${inputDir}`);
|
|
110
|
-
}
|
|
111
|
-
// Collect all .xs files from the directory tree
|
|
112
|
-
const files = this.collectFiles(inputDir);
|
|
113
|
-
if (files.length === 0) {
|
|
114
|
-
this.error(`No .xs files found in ${args.directory}`);
|
|
115
|
-
}
|
|
116
|
-
// Read each file and track file path alongside content
|
|
117
|
-
const documentEntries = [];
|
|
118
|
-
for (const filePath of files) {
|
|
119
|
-
const content = fs.readFileSync(filePath, 'utf8').trim();
|
|
120
|
-
if (content) {
|
|
121
|
-
documentEntries.push({ content, filePath });
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
if (documentEntries.length === 0) {
|
|
125
|
-
this.error(`All .xs files in ${args.directory} are empty`);
|
|
126
|
-
}
|
|
127
|
-
const multidoc = documentEntries.map((d) => d.content).join('\n---\n');
|
|
128
|
-
// Construct the API URL
|
|
129
|
-
const queryParams = new URLSearchParams({
|
|
130
|
-
env: flags.env.toString(),
|
|
131
|
-
records: flags.records.toString(),
|
|
132
|
-
transaction: flags.transaction.toString(),
|
|
133
|
-
truncate: flags.truncate.toString(),
|
|
134
|
-
});
|
|
135
|
-
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/tenant/${tenantName}/multidoc?${queryParams.toString()}`;
|
|
136
|
-
// POST the multidoc to the API
|
|
137
|
-
const requestHeaders = {
|
|
138
|
-
accept: 'application/json',
|
|
139
|
-
Authorization: `Bearer ${profile.access_token}`,
|
|
140
|
-
'Content-Type': 'text/x-xanoscript',
|
|
141
|
-
};
|
|
142
|
-
const startTime = Date.now();
|
|
143
|
-
try {
|
|
144
|
-
const response = await this.verboseFetch(apiUrl, {
|
|
145
|
-
body: multidoc,
|
|
146
|
-
headers: requestHeaders,
|
|
147
|
-
method: 'POST',
|
|
148
|
-
}, flags.verbose, profile.access_token);
|
|
149
|
-
if (!response.ok) {
|
|
150
|
-
const errorText = await response.text();
|
|
151
|
-
let errorMessage = `Push failed (${response.status})`;
|
|
152
|
-
try {
|
|
153
|
-
const errorJson = JSON.parse(errorText);
|
|
154
|
-
errorMessage += `: ${errorJson.message}`;
|
|
155
|
-
if (errorJson.payload?.param) {
|
|
156
|
-
errorMessage += `\n Parameter: ${errorJson.payload.param}`;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
catch {
|
|
160
|
-
errorMessage += `\n${errorText}`;
|
|
161
|
-
}
|
|
162
|
-
// Surface local files involved in duplicate GUID errors
|
|
163
|
-
const guidMatch = errorMessage.match(/Duplicate \w+ guid: (\S+)/);
|
|
164
|
-
if (guidMatch) {
|
|
165
|
-
const dupeFiles = findFilesWithGuid(documentEntries, guidMatch[1]);
|
|
166
|
-
if (dupeFiles.length > 0) {
|
|
167
|
-
const relPaths = dupeFiles.map((f) => path.relative(inputDir, f));
|
|
168
|
-
errorMessage += `\n Local files with this GUID:\n${relPaths.map((f) => ` ${f}`).join('\n')}`;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
this.error(errorMessage);
|
|
172
|
-
}
|
|
173
|
-
// Parse the response (suppress raw output; only show in verbose mode)
|
|
174
|
-
const responseText = await response.text();
|
|
175
|
-
if (responseText && responseText !== 'null' && flags.verbose) {
|
|
176
|
-
this.log(responseText);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
catch (error) {
|
|
180
|
-
if (error instanceof Error) {
|
|
181
|
-
this.error(`Failed to push multidoc: ${error.message}`);
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
this.error(`Failed to push multidoc: ${String(error)}`);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
const elapsed = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
188
|
-
this.log(`Pushed ${documentEntries.length} documents to tenant ${tenantName} from ${args.directory} in ${elapsed}s`);
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Recursively collect all .xs files from a directory, sorted by
|
|
192
|
-
* type subdirectory name then filename for deterministic ordering.
|
|
193
|
-
*/
|
|
194
|
-
collectFiles(dir) {
|
|
195
|
-
const files = [];
|
|
196
|
-
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
197
|
-
for (const entry of entries) {
|
|
198
|
-
const fullPath = path.join(dir, entry.name);
|
|
199
|
-
if (entry.isDirectory()) {
|
|
200
|
-
files.push(...this.collectFiles(fullPath));
|
|
201
|
-
}
|
|
202
|
-
else if (entry.isFile() && entry.name.endsWith('.xs')) {
|
|
203
|
-
files.push(fullPath);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return files.sort();
|
|
207
|
-
}
|
|
208
|
-
loadCredentials() {
|
|
209
|
-
const configDir = path.join(os.homedir(), '.xano');
|
|
210
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
211
|
-
// Check if credentials file exists
|
|
212
|
-
if (!fs.existsSync(credentialsPath)) {
|
|
213
|
-
this.error(`Credentials file not found at ${credentialsPath}\n` + `Create a profile using 'xano profile:create'`);
|
|
214
|
-
}
|
|
215
|
-
// Read credentials file
|
|
216
|
-
try {
|
|
217
|
-
const fileContent = fs.readFileSync(credentialsPath, 'utf8');
|
|
218
|
-
const parsed = yaml.load(fileContent);
|
|
219
|
-
if (!parsed || typeof parsed !== 'object' || !('profiles' in parsed)) {
|
|
220
|
-
this.error('Credentials file has invalid format.');
|
|
221
|
-
}
|
|
222
|
-
return parsed;
|
|
223
|
-
}
|
|
224
|
-
catch (error) {
|
|
225
|
-
this.error(`Failed to parse credentials file: ${error}`);
|
|
226
|
-
}
|
|
5
|
+
this.error('Direct tenant push is not supported.\n' +
|
|
6
|
+
'To deploy changes, use one of the following:\n' +
|
|
7
|
+
' - Create a release through the standard deployment workflow\n' +
|
|
8
|
+
' - Use the sandbox: xano sandbox push <directory>');
|
|
227
9
|
}
|
|
228
10
|
}
|
|
@@ -8,6 +8,7 @@ export default class TenantUnitTestList 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
|
};
|
|
@@ -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
|
};
|
|
@@ -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
|
};
|
|
@@ -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
|
};
|
|
@@ -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
|
};
|
|
@@ -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
|
};
|
|
@@ -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` +
|
|
@@ -11,6 +11,7 @@ export default class WorkspaceDelete extends BaseCommand {
|
|
|
11
11
|
static flags: {
|
|
12
12
|
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
13
|
output: import("@oclif/core/interfaces").OptionFlag<string, 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 WorkspaceDelete extends BaseCommand {
|
|
8
6
|
static args = {
|
|
@@ -118,8 +116,7 @@ Deleted workspace 123
|
|
|
118
116
|
});
|
|
119
117
|
}
|
|
120
118
|
loadCredentials() {
|
|
121
|
-
const
|
|
122
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
119
|
+
const credentialsPath = this.getCredentialsPath();
|
|
123
120
|
// Check if credentials file exists
|
|
124
121
|
if (!fs.existsSync(credentialsPath)) {
|
|
125
122
|
this.error(`Credentials file not found at ${credentialsPath}\n` +
|
|
@@ -15,6 +15,7 @@ export default class WorkspaceEdit extends BaseCommand {
|
|
|
15
15
|
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
'require-token': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
17
|
swagger: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
config: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
19
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
20
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
21
|
};
|
|
@@ -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 WorkspaceEdit extends BaseCommand {
|
|
8
6
|
static args = {
|
|
@@ -164,8 +162,7 @@ Updated workspace: my-workspace (ID: 123)
|
|
|
164
162
|
}
|
|
165
163
|
}
|
|
166
164
|
loadCredentials() {
|
|
167
|
-
const
|
|
168
|
-
const credentialsPath = path.join(configDir, 'credentials.yaml');
|
|
165
|
+
const credentialsPath = this.getCredentialsPath();
|
|
169
166
|
// Check if credentials file exists
|
|
170
167
|
if (!fs.existsSync(credentialsPath)) {
|
|
171
168
|
this.error(`Credentials file not found at ${credentialsPath}\n` + `Create a profile using 'xano profile create'`);
|