@anvil-works/anvil-cli 0.3.11 → 0.3.12
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/cli.js +2 -11
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -50506,7 +50506,7 @@ var __webpack_exports__ = {};
|
|
|
50506
50506
|
loginCommand.addHelpText("after", "\n" + chalk_source.bold("Examples:") + "\n anvil login Log in to default Anvil server\n anvil login anvil.works Log in to anvil.works\n anvil login localhost Log in to local Anvil server\n");
|
|
50507
50507
|
}
|
|
50508
50508
|
function registerLogoutCommand(program) {
|
|
50509
|
-
const logoutCommand = program.command("logout [anvil-server-url]").description("
|
|
50509
|
+
const logoutCommand = program.command("logout [anvil-server-url]").description("Log out from Anvil (optionally specify URL to logout from specific installation)").option("-u, --url <ANVIL_URL>", "Specify Anvil server URL to logout from").option("-U, --user <USERNAME>", "Specify which user account to logout from").alias("lo").action(async (anvilUrl, options)=>{
|
|
50510
50510
|
try {
|
|
50511
50511
|
const urlToLogout = options?.url || anvilUrl;
|
|
50512
50512
|
const usernameToLogout = options?.user;
|
|
@@ -50693,14 +50693,6 @@ var __webpack_exports__ = {};
|
|
|
50693
50693
|
logger_logger.error(`Unexpected error: ${reason}`);
|
|
50694
50694
|
process.exit(1);
|
|
50695
50695
|
});
|
|
50696
|
-
function showBetaBanner() {
|
|
50697
|
-
console.log();
|
|
50698
|
-
console.log(chalk_source.yellow("┌────────────────────────────────────────────────────────┐"));
|
|
50699
|
-
console.log(chalk_source.yellow("│") + chalk_source.bgYellow.black.bold(" BETA ") + chalk_source.yellow(" This tool is in beta. Please report issues at: │"));
|
|
50700
|
-
console.log(chalk_source.yellow("│") + chalk_source.gray(" https://github.com/anvil-works/anvil-cli/issues") + chalk_source.yellow(" │"));
|
|
50701
|
-
console.log(chalk_source.yellow("└────────────────────────────────────────────────────────┘"));
|
|
50702
|
-
console.log();
|
|
50703
|
-
}
|
|
50704
50696
|
async function checkVersionAndWarn() {
|
|
50705
50697
|
getLatestVersion().then((latestVersion)=>{
|
|
50706
50698
|
if (latestVersion && semver_default().valid(VERSION) && semver_default().valid(latestVersion) && semver_default().lt(VERSION, latestVersion)) {
|
|
@@ -50748,13 +50740,12 @@ var __webpack_exports__ = {};
|
|
|
50748
50740
|
}
|
|
50749
50741
|
}
|
|
50750
50742
|
const cli_program = new Command();
|
|
50751
|
-
cli_program.name("anvil").description("CLI tool for developing Anvil apps locally").version(VERSION, "-v, --version", "
|
|
50743
|
+
cli_program.name("anvil").description("CLI tool for developing Anvil apps locally").version(VERSION, "-v, --version", "Output the version number").option("--json", "Output in JSON format (NDJSON) for scripting/LLM consumption").helpOption('-h, --help', 'Display help for anvil command').hook("preAction", async (thisCommand, actionCommand)=>{
|
|
50752
50744
|
const opts = thisCommand.opts();
|
|
50753
50745
|
if (opts.json) setGlobalOutputConfig({
|
|
50754
50746
|
jsonMode: true
|
|
50755
50747
|
});
|
|
50756
50748
|
if (!opts.json) {
|
|
50757
|
-
showBetaBanner();
|
|
50758
50749
|
const commandName = actionCommand?.name();
|
|
50759
50750
|
if ("update" !== commandName) checkVersionAndWarn();
|
|
50760
50751
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anvil-works/anvil-cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "CLI tool for developing Anvil apps locally",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"url": "https://github.com/anvil-works/anvil-cli.git"
|
|
30
30
|
},
|
|
31
31
|
"bugs": {
|
|
32
|
-
"url": "https://
|
|
32
|
+
"url": "https://anvil.works/forum"
|
|
33
33
|
},
|
|
34
|
-
"homepage": "https://
|
|
34
|
+
"homepage": "https://anvil.works/docs",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@rslib/core": "^0.17.1",
|
|
37
37
|
"@rstest/core": "^0.6.2",
|