@xano/cli 0.0.29 → 0.0.31

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.
@@ -9,9 +9,9 @@ export default class Pull extends BaseCommand {
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
11
  records: import("@oclif/core/interfaces").BooleanFlag<boolean>;
12
- verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
12
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
13
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
15
  };
16
16
  run(): Promise<void>;
17
17
  private loadCredentials;
@@ -44,12 +44,6 @@ Pulled 42 documents to ./my-workspace
44
44
  description: 'Include records',
45
45
  required: false,
46
46
  }),
47
- verbose: Flags.boolean({
48
- char: 'v',
49
- default: false,
50
- description: 'Show request details',
51
- required: false,
52
- }),
53
47
  workspace: Flags.string({
54
48
  char: 'w',
55
49
  description: 'Workspace ID (optional if set in profile)',
@@ -100,21 +94,12 @@ Pulled 42 documents to ./my-workspace
100
94
  const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/multidoc?${queryParams.toString()}`;
101
95
  // Fetch multidoc from the API
102
96
  let responseText;
103
- const requestHeaders = {
104
- 'accept': 'application/json',
105
- 'Authorization': `Bearer ${profile.access_token}`,
106
- };
107
- if (flags.verbose) {
108
- this.log('Request details:');
109
- this.log(` Method: GET`);
110
- this.log(` URL: ${apiUrl}`);
111
- this.log(` Headers:`);
112
- this.log(` accept: application/json`);
113
- this.log(` Authorization: Bearer ${profile.access_token.slice(0, 8)}...${profile.access_token.slice(-4)}`);
114
- }
115
97
  try {
116
98
  const response = await fetch(apiUrl, {
117
- headers: requestHeaders,
99
+ headers: {
100
+ 'accept': 'application/json',
101
+ 'Authorization': `Bearer ${profile.access_token}`,
102
+ },
118
103
  method: 'GET',
119
104
  });
120
105
  if (!response.ok) {
@@ -7,9 +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
- verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
11
10
  workspace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
11
  profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
13
  };
14
14
  run(): Promise<void>;
15
15
  /**
@@ -33,12 +33,6 @@ Pushed 42 documents from ./my-workspace
33
33
  description: 'Branch name (optional if set in profile, defaults to live)',
34
34
  required: false,
35
35
  }),
36
- verbose: Flags.boolean({
37
- char: 'v',
38
- default: false,
39
- description: 'Show request details',
40
- required: false,
41
- }),
42
36
  workspace: Flags.string({
43
37
  char: 'w',
44
38
  description: 'Workspace ID (optional if set in profile)',
@@ -108,25 +102,14 @@ Pushed 42 documents from ./my-workspace
108
102
  const queryParams = new URLSearchParams({ branch });
109
103
  const apiUrl = `${profile.instance_origin}/api:meta/workspace/${workspaceId}/multidoc?${queryParams.toString()}`;
110
104
  // POST the multidoc to the API
111
- const requestHeaders = {
112
- 'accept': 'application/json',
113
- 'Authorization': `Bearer ${profile.access_token}`,
114
- 'Content-Type': 'text/x-xanoscript',
115
- };
116
- if (flags.verbose) {
117
- this.log('Request details:');
118
- this.log(` Method: POST`);
119
- this.log(` URL: ${apiUrl}`);
120
- this.log(` Headers:`);
121
- this.log(` accept: application/json`);
122
- this.log(` Authorization: Bearer ${profile.access_token.slice(0, 8)}...${profile.access_token.slice(-4)}`);
123
- this.log(` Content-Type: text/x-xanoscript`);
124
- this.log(` Body: ${multidoc.length} bytes (${documents.length} documents)`);
125
- }
126
105
  try {
127
106
  const response = await fetch(apiUrl, {
128
107
  body: multidoc,
129
- headers: requestHeaders,
108
+ headers: {
109
+ 'accept': 'application/json',
110
+ 'Authorization': `Bearer ${profile.access_token}`,
111
+ 'Content-Type': 'text/x-xanoscript',
112
+ },
130
113
  method: 'POST',
131
114
  });
132
115
  if (!response.ok) {