@xano/cli 0.0.46 → 0.0.47
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 +3 -0
- package/dist/commands/tenant/impersonate/index.js +1 -1
- package/dist/commands/update/index.d.ts +5 -0
- package/dist/commands/update/index.js +13 -3
- package/oclif.manifest.json +1728 -1721
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ Impersonation successful!
|
|
|
71
71
|
const params = new URLSearchParams({
|
|
72
72
|
_ti: response._ti,
|
|
73
73
|
});
|
|
74
|
-
const impersonateUrl = `${frontendUrl}/
|
|
74
|
+
const impersonateUrl = `${frontendUrl}/impersonate?${params.toString()}`;
|
|
75
75
|
if (flags['url-only']) {
|
|
76
76
|
this.log(impersonateUrl);
|
|
77
77
|
}
|
|
@@ -2,5 +2,10 @@ import BaseCommand from '../../base-command.js';
|
|
|
2
2
|
export default class Update extends BaseCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
check: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
};
|
|
5
10
|
run(): Promise<void>;
|
|
6
11
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
1
2
|
import { execSync } from 'node:child_process';
|
|
2
3
|
import BaseCommand from '../../base-command.js';
|
|
3
4
|
export default class Update extends BaseCommand {
|
|
4
5
|
static description = 'Update the Xano CLI to the latest version';
|
|
5
|
-
static examples = [
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
static examples = [`$ xano update`, `$ xano update --check`];
|
|
7
|
+
static flags = {
|
|
8
|
+
...BaseCommand.flags,
|
|
9
|
+
check: Flags.boolean({
|
|
10
|
+
description: 'Check for updates without installing',
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
8
13
|
async run() {
|
|
14
|
+
const { flags } = await this.parse(Update);
|
|
9
15
|
const currentVersion = this.config.version;
|
|
10
16
|
this.log(`Current version: ${currentVersion}`);
|
|
11
17
|
this.log('Checking for updates...');
|
|
@@ -15,6 +21,10 @@ export default class Update extends BaseCommand {
|
|
|
15
21
|
this.log(`Already up to date (${currentVersion})`);
|
|
16
22
|
return;
|
|
17
23
|
}
|
|
24
|
+
if (flags.check) {
|
|
25
|
+
this.log(`Update available: ${currentVersion} → ${latest}`);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
18
28
|
this.log(`Updating @xano/cli ${currentVersion} → ${latest}...`);
|
|
19
29
|
execSync('npm install -g @xano/cli@latest', { stdio: 'inherit' });
|
|
20
30
|
this.log(`Updated to ${latest}`);
|