@xano/cli 0.0.31 → 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.
- package/dist/base-command.d.ts +5 -0
- package/dist/base-command.js +32 -1
- package/dist/commands/branch/create/index.js +3 -3
- package/dist/commands/branch/delete/index.js +2 -2
- package/dist/commands/branch/edit/index.js +3 -3
- package/dist/commands/branch/get/index.js +2 -2
- package/dist/commands/branch/list/index.js +2 -2
- package/dist/commands/branch/set-live/index.js +2 -2
- package/dist/commands/function/create/index.js +2 -2
- package/dist/commands/function/edit/index.js +2 -2
- package/dist/commands/function/get/index.js +2 -2
- package/dist/commands/function/list/index.js +2 -2
- package/dist/commands/platform/get/index.d.ts +18 -0
- package/dist/commands/platform/get/index.js +126 -0
- package/dist/commands/platform/list/index.d.ts +12 -0
- package/dist/commands/platform/list/index.js +113 -0
- package/dist/commands/profile/me/index.js +2 -2
- package/dist/commands/release/create/index.d.ts +18 -0
- package/dist/commands/release/create/index.js +138 -0
- package/dist/commands/release/delete/index.d.ts +21 -0
- package/dist/commands/release/delete/index.js +134 -0
- package/dist/commands/release/edit/index.d.ts +21 -0
- package/dist/commands/release/edit/index.js +137 -0
- package/dist/commands/release/export/index.d.ts +20 -0
- package/dist/commands/release/export/index.js +142 -0
- package/dist/commands/release/get/index.d.ts +19 -0
- package/dist/commands/release/get/index.js +123 -0
- package/dist/commands/release/import/index.d.ts +15 -0
- package/dist/commands/release/import/index.js +114 -0
- package/dist/commands/release/list/index.d.ts +13 -0
- package/dist/commands/release/list/index.js +120 -0
- package/dist/commands/static_host/build/create/index.js +2 -2
- package/dist/commands/static_host/build/get/index.js +2 -2
- package/dist/commands/static_host/build/list/index.js +2 -2
- package/dist/commands/static_host/list/index.js +2 -2
- package/dist/commands/tenant/backup/create/index.d.ts +17 -0
- package/dist/commands/tenant/backup/create/index.js +113 -0
- package/dist/commands/tenant/backup/delete/index.d.ts +19 -0
- package/dist/commands/tenant/backup/delete/index.js +137 -0
- package/dist/commands/tenant/backup/export/index.d.ts +18 -0
- package/dist/commands/tenant/backup/export/index.js +147 -0
- package/dist/commands/tenant/backup/import/index.d.ts +18 -0
- package/dist/commands/tenant/backup/import/index.js +127 -0
- package/dist/commands/tenant/backup/list/index.d.ts +17 -0
- package/dist/commands/tenant/backup/list/index.js +137 -0
- package/dist/commands/tenant/backup/restore/index.d.ts +19 -0
- package/dist/commands/tenant/backup/restore/index.js +141 -0
- package/dist/commands/tenant/create/index.d.ts +21 -0
- package/dist/commands/tenant/create/index.js +155 -0
- package/dist/commands/tenant/delete/index.d.ts +18 -0
- package/dist/commands/tenant/delete/index.js +134 -0
- package/dist/commands/tenant/deploy-platform/index.d.ts +17 -0
- package/dist/commands/tenant/deploy-platform/index.js +116 -0
- package/dist/commands/tenant/deploy-release/index.d.ts +17 -0
- package/dist/commands/tenant/deploy-release/index.js +116 -0
- package/dist/commands/tenant/edit/index.d.ts +23 -0
- package/dist/commands/tenant/edit/index.js +167 -0
- package/dist/commands/tenant/get/index.d.ts +16 -0
- package/dist/commands/tenant/get/index.js +135 -0
- package/dist/commands/tenant/list/index.d.ts +13 -0
- package/dist/commands/tenant/list/index.js +123 -0
- package/dist/commands/workspace/create/index.d.ts +3 -1
- package/dist/commands/workspace/create/index.js +15 -14
- package/dist/commands/workspace/delete/index.js +2 -2
- package/dist/commands/workspace/edit/index.js +3 -3
- package/dist/commands/workspace/get/index.js +2 -2
- package/dist/commands/workspace/list/index.js +2 -2
- package/dist/commands/workspace/pull/index.d.ts +1 -0
- package/dist/commands/workspace/pull/index.js +45 -10
- package/dist/commands/workspace/push/index.d.ts +3 -0
- package/dist/commands/workspace/push/index.js +41 -8
- package/oclif.manifest.json +3174 -1220
- package/package.json +10 -1
|
@@ -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
|
|
16
|
+
`$ xano workspace create my-workspace
|
|
11
17
|
Created workspace: my-workspace (ID: 123)
|
|
12
18
|
`,
|
|
13
|
-
`$ xano workspace create
|
|
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
|
|
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,22 +66,22 @@ 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:
|
|
69
|
+
name: args.name,
|
|
69
70
|
};
|
|
70
71
|
if (flags.description) {
|
|
71
72
|
body.description = flags.description;
|
|
72
73
|
}
|
|
73
74
|
// Create workspace via the API
|
|
74
75
|
try {
|
|
75
|
-
const response = await
|
|
76
|
+
const response = await this.verboseFetch(apiUrl, {
|
|
76
77
|
body: JSON.stringify(body),
|
|
77
78
|
headers: {
|
|
78
79
|
'accept': 'application/json',
|
|
79
80
|
'Authorization': `Bearer ${profile.access_token}`,
|
|
80
|
-
'
|
|
81
|
+
'Content-Type': 'application/json',
|
|
81
82
|
},
|
|
82
83
|
method: 'POST',
|
|
83
|
-
});
|
|
84
|
+
}, flags.verbose, profile.access_token);
|
|
84
85
|
if (!response.ok) {
|
|
85
86
|
const errorText = await response.text();
|
|
86
87
|
this.error(`API request failed with status ${response.status}: ${response.statusText}\n${errorText}`);
|
|
@@ -75,13 +75,13 @@ Deleted workspace 123
|
|
|
75
75
|
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}`;
|
|
76
76
|
// Delete workspace via the API
|
|
77
77
|
try {
|
|
78
|
-
const response = await
|
|
78
|
+
const response = await this.verboseFetch(apiUrl, {
|
|
79
79
|
headers: {
|
|
80
80
|
'accept': 'application/json',
|
|
81
81
|
'Authorization': `Bearer ${profile.access_token}`,
|
|
82
82
|
},
|
|
83
83
|
method: 'DELETE',
|
|
84
|
-
});
|
|
84
|
+
}, flags.verbose, profile.access_token);
|
|
85
85
|
if (!response.ok) {
|
|
86
86
|
const errorText = await response.text();
|
|
87
87
|
this.error(`API request failed with status ${response.status}: ${response.statusText}\n${errorText}`);
|
|
@@ -111,15 +111,15 @@ Updated workspace: my-workspace (ID: 123)
|
|
|
111
111
|
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}`;
|
|
112
112
|
// Update workspace via the API
|
|
113
113
|
try {
|
|
114
|
-
const response = await
|
|
114
|
+
const response = await this.verboseFetch(apiUrl, {
|
|
115
115
|
body: JSON.stringify(body),
|
|
116
116
|
headers: {
|
|
117
117
|
'accept': 'application/json',
|
|
118
118
|
'Authorization': `Bearer ${profile.access_token}`,
|
|
119
|
-
'
|
|
119
|
+
'Content-Type': 'application/json',
|
|
120
120
|
},
|
|
121
121
|
method: 'PUT',
|
|
122
|
-
});
|
|
122
|
+
}, flags.verbose, profile.access_token);
|
|
123
123
|
if (!response.ok) {
|
|
124
124
|
const errorText = await response.text();
|
|
125
125
|
this.error(`API request failed with status ${response.status}: ${response.statusText}\n${errorText}`);
|
|
@@ -71,13 +71,13 @@ Workspace: my-workspace (ID: 123)
|
|
|
71
71
|
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}`;
|
|
72
72
|
// Fetch workspace from the API
|
|
73
73
|
try {
|
|
74
|
-
const response = await
|
|
74
|
+
const response = await this.verboseFetch(apiUrl, {
|
|
75
75
|
headers: {
|
|
76
76
|
'accept': 'application/json',
|
|
77
77
|
'Authorization': `Bearer ${profile.access_token}`,
|
|
78
78
|
},
|
|
79
79
|
method: 'GET',
|
|
80
|
-
});
|
|
80
|
+
}, flags.verbose, profile.access_token);
|
|
81
81
|
if (!response.ok) {
|
|
82
82
|
const errorText = await response.text();
|
|
83
83
|
this.error(`API request failed with status ${response.status}: ${response.statusText}\n${errorText}`);
|
|
@@ -76,13 +76,13 @@ Available workspaces:
|
|
|
76
76
|
const apiUrl = `${profile.instance_origin}/api:meta/workspace`;
|
|
77
77
|
// Fetch workspaces from the API
|
|
78
78
|
try {
|
|
79
|
-
const response = await
|
|
79
|
+
const response = await this.verboseFetch(apiUrl, {
|
|
80
80
|
headers: {
|
|
81
81
|
'accept': 'application/json',
|
|
82
82
|
'Authorization': `Bearer ${profile.access_token}`,
|
|
83
83
|
},
|
|
84
84
|
method: 'GET',
|
|
85
|
-
});
|
|
85
|
+
}, flags.verbose, profile.access_token);
|
|
86
86
|
if (!response.ok) {
|
|
87
87
|
const errorText = await response.text();
|
|
88
88
|
this.error(`API request failed with status ${response.status}: ${response.statusText}\n${errorText}`);
|
|
@@ -8,6 +8,7 @@ export default class Pull extends BaseCommand {
|
|
|
8
8
|
static flags: {
|
|
9
9
|
branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
env: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
draft: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
12
|
records: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
13
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
14
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -22,6 +22,9 @@ Pulled 15 documents to ./output
|
|
|
22
22
|
`,
|
|
23
23
|
`$ xano workspace pull ./backup --profile production --env --records
|
|
24
24
|
Pulled 58 documents to ./backup
|
|
25
|
+
`,
|
|
26
|
+
`$ xano workspace pull ./my-workspace --draft
|
|
27
|
+
Pulled 42 documents to ./my-workspace
|
|
25
28
|
`,
|
|
26
29
|
`$ xano workspace pull ./my-workspace -b dev
|
|
27
30
|
Pulled 42 documents to ./my-workspace
|
|
@@ -39,6 +42,11 @@ Pulled 42 documents to ./my-workspace
|
|
|
39
42
|
description: 'Include environment variables',
|
|
40
43
|
required: false,
|
|
41
44
|
}),
|
|
45
|
+
draft: Flags.boolean({
|
|
46
|
+
default: false,
|
|
47
|
+
description: 'Include draft versions',
|
|
48
|
+
required: false,
|
|
49
|
+
}),
|
|
42
50
|
records: Flags.boolean({
|
|
43
51
|
default: false,
|
|
44
52
|
description: 'Include records',
|
|
@@ -88,20 +96,22 @@ Pulled 42 documents to ./my-workspace
|
|
|
88
96
|
const queryParams = new URLSearchParams({
|
|
89
97
|
branch,
|
|
90
98
|
env: flags.env.toString(),
|
|
99
|
+
include_draft: flags.draft.toString(),
|
|
91
100
|
records: flags.records.toString(),
|
|
92
101
|
});
|
|
93
102
|
// Construct the API URL
|
|
94
103
|
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/multidoc?${queryParams.toString()}`;
|
|
95
104
|
// Fetch multidoc from the API
|
|
96
105
|
let responseText;
|
|
106
|
+
const requestHeaders = {
|
|
107
|
+
'accept': 'application/json',
|
|
108
|
+
'Authorization': `Bearer ${profile.access_token}`,
|
|
109
|
+
};
|
|
97
110
|
try {
|
|
98
|
-
const response = await
|
|
99
|
-
headers:
|
|
100
|
-
'accept': 'application/json',
|
|
101
|
-
'Authorization': `Bearer ${profile.access_token}`,
|
|
102
|
-
},
|
|
111
|
+
const response = await this.verboseFetch(apiUrl, {
|
|
112
|
+
headers: requestHeaders,
|
|
103
113
|
method: 'GET',
|
|
104
|
-
});
|
|
114
|
+
}, flags.verbose, profile.access_token);
|
|
105
115
|
if (!response.ok) {
|
|
106
116
|
const errorText = await response.text();
|
|
107
117
|
this.error(`API request failed with status ${response.status}: ${response.statusText}\n${errorText}`);
|
|
@@ -154,14 +164,29 @@ Pulled 42 documents to ./my-workspace
|
|
|
154
164
|
typeDir = path.join(outputDir, 'workspace', 'trigger');
|
|
155
165
|
baseName = this.sanitizeFilename(doc.name);
|
|
156
166
|
}
|
|
167
|
+
else if (doc.type === 'agent') {
|
|
168
|
+
// agent → ai/agent/{name}.xs
|
|
169
|
+
typeDir = path.join(outputDir, 'ai', 'agent');
|
|
170
|
+
baseName = this.sanitizeFilename(doc.name);
|
|
171
|
+
}
|
|
172
|
+
else if (doc.type === 'mcp_server') {
|
|
173
|
+
// mcp_server → ai/mcp_server/{name}.xs
|
|
174
|
+
typeDir = path.join(outputDir, 'ai', 'mcp_server');
|
|
175
|
+
baseName = this.sanitizeFilename(doc.name);
|
|
176
|
+
}
|
|
177
|
+
else if (doc.type === 'tool') {
|
|
178
|
+
// tool → ai/tool/{name}.xs
|
|
179
|
+
typeDir = path.join(outputDir, 'ai', 'tool');
|
|
180
|
+
baseName = this.sanitizeFilename(doc.name);
|
|
181
|
+
}
|
|
157
182
|
else if (doc.type === 'agent_trigger') {
|
|
158
|
-
// agent_trigger → agent/trigger/{name}.xs
|
|
159
|
-
typeDir = path.join(outputDir, 'agent', 'trigger');
|
|
183
|
+
// agent_trigger → ai/agent/trigger/{name}.xs
|
|
184
|
+
typeDir = path.join(outputDir, 'ai', 'agent', 'trigger');
|
|
160
185
|
baseName = this.sanitizeFilename(doc.name);
|
|
161
186
|
}
|
|
162
187
|
else if (doc.type === 'mcp_server_trigger') {
|
|
163
|
-
// mcp_server_trigger → mcp_server/trigger/{name}.xs
|
|
164
|
-
typeDir = path.join(outputDir, 'mcp_server', 'trigger');
|
|
188
|
+
// mcp_server_trigger → ai/mcp_server/trigger/{name}.xs
|
|
189
|
+
typeDir = path.join(outputDir, 'ai', 'mcp_server', 'trigger');
|
|
165
190
|
baseName = this.sanitizeFilename(doc.name);
|
|
166
191
|
}
|
|
167
192
|
else if (doc.type === 'table_trigger') {
|
|
@@ -169,6 +194,16 @@ Pulled 42 documents to ./my-workspace
|
|
|
169
194
|
typeDir = path.join(outputDir, 'table', 'trigger');
|
|
170
195
|
baseName = this.sanitizeFilename(doc.name);
|
|
171
196
|
}
|
|
197
|
+
else if (doc.type === 'realtime_channel') {
|
|
198
|
+
// realtime_channel → realtime/channel/{name}.xs
|
|
199
|
+
typeDir = path.join(outputDir, 'realtime', 'channel');
|
|
200
|
+
baseName = this.sanitizeFilename(doc.name);
|
|
201
|
+
}
|
|
202
|
+
else if (doc.type === 'realtime_trigger') {
|
|
203
|
+
// realtime_trigger → realtime/trigger/{name}.xs
|
|
204
|
+
typeDir = path.join(outputDir, 'realtime', 'trigger');
|
|
205
|
+
baseName = this.sanitizeFilename(doc.name);
|
|
206
|
+
}
|
|
172
207
|
else if (doc.type === 'api_group') {
|
|
173
208
|
// api_group "test" → api/test/api_group.xs
|
|
174
209
|
const groupFolder = snakeCase(doc.name);
|
|
@@ -7,6 +7,9 @@ export default class Push extends BaseCommand {
|
|
|
7
7
|
static examples: string[];
|
|
8
8
|
static flags: {
|
|
9
9
|
branch: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
env: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
records: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
truncate: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
13
|
workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
14
|
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
15
|
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
@@ -24,6 +24,21 @@ Pushed 58 documents from ./backup
|
|
|
24
24
|
`,
|
|
25
25
|
`$ xano workspace push ./my-workspace -b dev
|
|
26
26
|
Pushed 42 documents from ./my-workspace
|
|
27
|
+
`,
|
|
28
|
+
`$ xano workspace push ./my-workspace --no-records
|
|
29
|
+
Push schema only, skip importing table records
|
|
30
|
+
`,
|
|
31
|
+
`$ xano workspace push ./my-workspace --no-env
|
|
32
|
+
Push without overwriting environment variables
|
|
33
|
+
`,
|
|
34
|
+
`$ xano workspace push ./my-workspace --truncate
|
|
35
|
+
Truncate all table records before importing
|
|
36
|
+
`,
|
|
37
|
+
`$ xano workspace push ./my-workspace --truncate --no-records
|
|
38
|
+
Truncate all table records without importing new ones
|
|
39
|
+
`,
|
|
40
|
+
`$ xano workspace push ./my-workspace --no-records --no-env
|
|
41
|
+
Push schema only, skip records and environment variables
|
|
27
42
|
`,
|
|
28
43
|
];
|
|
29
44
|
static flags = {
|
|
@@ -33,6 +48,23 @@ Pushed 42 documents from ./my-workspace
|
|
|
33
48
|
description: 'Branch name (optional if set in profile, defaults to live)',
|
|
34
49
|
required: false,
|
|
35
50
|
}),
|
|
51
|
+
env: Flags.boolean({
|
|
52
|
+
allowNo: true,
|
|
53
|
+
default: true,
|
|
54
|
+
description: 'Include environment variables in import (default: true, use --no-env to exclude)',
|
|
55
|
+
required: false,
|
|
56
|
+
}),
|
|
57
|
+
records: Flags.boolean({
|
|
58
|
+
allowNo: true,
|
|
59
|
+
default: true,
|
|
60
|
+
description: 'Include records in import (default: true, use --no-records to exclude)',
|
|
61
|
+
required: false,
|
|
62
|
+
}),
|
|
63
|
+
truncate: Flags.boolean({
|
|
64
|
+
default: false,
|
|
65
|
+
description: 'Truncate all table records before importing',
|
|
66
|
+
required: false,
|
|
67
|
+
}),
|
|
36
68
|
workspace: Flags.string({
|
|
37
69
|
char: 'w',
|
|
38
70
|
description: 'Workspace ID (optional if set in profile)',
|
|
@@ -99,19 +131,20 @@ Pushed 42 documents from ./my-workspace
|
|
|
99
131
|
// Determine branch from flag or profile
|
|
100
132
|
const branch = flags.branch || profile.branch || '';
|
|
101
133
|
// Construct the API URL
|
|
102
|
-
const queryParams = new URLSearchParams({ branch });
|
|
134
|
+
const queryParams = new URLSearchParams({ branch, env: flags.env.toString(), records: flags.records.toString(), truncate: flags.truncate.toString() });
|
|
103
135
|
const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/multidoc?${queryParams.toString()}`;
|
|
104
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
|
+
};
|
|
105
142
|
try {
|
|
106
|
-
const response = await
|
|
143
|
+
const response = await this.verboseFetch(apiUrl, {
|
|
107
144
|
body: multidoc,
|
|
108
|
-
headers:
|
|
109
|
-
'accept': 'application/json',
|
|
110
|
-
'Authorization': `Bearer ${profile.access_token}`,
|
|
111
|
-
'Content-Type': 'text/x-xanoscript',
|
|
112
|
-
},
|
|
145
|
+
headers: requestHeaders,
|
|
113
146
|
method: 'POST',
|
|
114
|
-
});
|
|
147
|
+
}, flags.verbose, profile.access_token);
|
|
115
148
|
if (!response.ok) {
|
|
116
149
|
const errorText = await response.text();
|
|
117
150
|
this.error(`API request failed with status ${response.status}: ${response.statusText}\n${errorText}`);
|