Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cli up #243

Merged
merged 6 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dev-release-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Package into node binary
uses: lando/pkg-action@v4
with:
entrypoint: bin/lando.js
entrypoint: bin/lando
arch: ${{ matrix.arch }}
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Package into node binary
uses: lando/pkg-action@v4
with:
entrypoint: bin/lando.js
entrypoint: bin/lando
arch: ${{ matrix.arch }}
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-release-tests-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: lando/pkg-action@v4
id: pkg-action
with:
entrypoint: bin/lando.js
entrypoint: bin/lando
arch: ${{ matrix.arch }}
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: lando/pkg-action@v4
id: pkg-action
with:
entrypoint: bin/lando.js
entrypoint: bin/lando
arch: ${{ matrix.arch }}
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Package into node binary
uses: lando/pkg-action@v4
with:
entrypoint: bin/lando.js
entrypoint: bin/lando
arch: ${{ matrix.arch }}
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Package into node binary
uses: lando/pkg-action@v4
with:
entrypoint: bin/lando.js
entrypoint: bin/lando
arch: ${{ matrix.arch }}
node-version: ${{ matrix.node-version }}
os: ${{ matrix.os }}
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v3.21.0-beta.5 - [February 27, 2024](https://github.com/lando/cli/releases/tag/v3.21.0-beta.5)

### CLI

* Improved `lando setup` message
* Improved CLI metadata to help resolve [#109](https://github.com/lando/core/issues/109) and [#122](https://github.com/lando/core/issues/122)
* Renamed `bin` entrypoint to `/bin/lando` from `/bin/lando.js`

### Core

* Updated `@lando/core` to [`v3.21.0-beta.5`](https://github.com/lando/core/releases/tag/v3.21.0-beta.5)

## v3.21.0-beta.2 - [February 20, 2024](https://github.com/lando/cli/releases/tag/v3.21.0-beta.2)

* Updated `@lando/core` to [`v3.21.0-beta.2`](https://github.com/lando/core/releases/tag/v3.21.0-beta.2)
Expand Down
6 changes: 3 additions & 3 deletions bin/lando.js → bin/lando
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ if (runtime === 4) {
debug('handing off to %o with caching %o at %o and debug %o', '@lando/cli@4', cache ? 'enabled' : 'disabled', cacheDir, debug.enabled);

// get the cli
const Cli = require('./../lib/cli-next');
const Cli = require('../lib/cli-next');
// override some default static props
Cli.debug = debug.extend('cli');
Cli.id = config.product;
Expand Down Expand Up @@ -153,8 +153,8 @@ if (runtime === 4) {
if (appConfig.appCore && fs.existsSync(path.join(appConfig.appCore, 'index.js'))) COREBASE = appConfig.appCore;

// Summon the implementation of @lando/cli@3 that works with @lando/core@3
const Cli = require('./../lib/cli');
const cli = new Cli(ENVPREFIX, LOGLEVELCONSOLE, USERCONFROOT, COREBASE);
const Cli = require('../lib/cli');
const cli = new Cli(ENVPREFIX, LOGLEVELCONSOLE, USERCONFROOT, COREBASE, debug);
const bsLevel = (_.has(appConfig, 'recipe')) ? 'APP' : 'TASKS';
const getTasks = require(`${COREBASE}/utils/get-tasks`);
debug('starting lando with %o runtime using cli %o', `v${runtime}`, {ENVPREFIX, LOGLEVELCONSOLE, USERCONFROOT, COREBASE});
Expand Down
44 changes: 28 additions & 16 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,39 @@ function sidebar() {
collapsed: false,
items: [
{text: 'Overview', link: '/'},
{text: 'Default Commands', link: '/defaults'},
{text: 'Tooling', link: '/tooling'},
],
},
{
text: 'Commands',
collapsed: false,
items: [
{text: 'lando config', link: '/config'},
{text: 'lando destroy', link: '/destroy'},
{text: 'lando init', link: '/init'},
{text: 'lando info', link: '/info'},
{text: 'lando list', link: '/list'},
{text: 'lando logs', link: '/logs'},
{text: 'lando poweroff', link: '/poweroff'},
{text: 'lando rebuild', link: '/rebuild'},
{text: 'lando restart', link: '/restart'},
{text: 'lando share', link: '/share'},
{text: 'lando ssh', link: '/ssh'},
{text: 'lando start', link: '/start'},
{text: 'lando stop', link: '/stop'},
{text: 'lando update', link: '/update'},
{text: 'lando version', link: '/version'},
],
},
{
text: 'Mgmt Commands',
collapsed: true,
items: [
{text: 'Lando Config', link: '/config'},
{text: 'Lando Destroy', link: '/destroy'},
{text: 'Lando Init', link: '/init'},
{text: 'Lando Info', link: '/info'},
{text: 'Lando List', link: '/list'},
{text: 'Lando Logs', link: '/logs'},
{text: 'Lando Poweroff', link: '/poweroff'},
{text: 'Lando Rebuild', link: '/rebuild'},
{text: 'Lando Restart', link: '/restart'},
{text: 'Lando Share', link: '/share'},
{text: 'Lando SSH', link: '/ssh'},
{text: 'Lando Start', link: '/start'},
{text: 'Lando Stop', link: '/stop'},
{text: 'Lando Version', link: '/version'},
{text: 'lando plugin-add', link: '/plugin-add'},
{text: 'lando plugin-login', link: '/plugin-login'},
{text: 'lando plugin-logout', link: '/plugin-logout'},
{text: 'lando plugin-remove', link: '/plugin-remove'},
{text: 'lando setup', link: '/setup'},
{text: 'lando shellenv', link: '/shellenv'},
],
},
{
Expand All @@ -72,6 +83,7 @@ function sidebar() {
{text: 'Contact Us', link: '/support'},
],
},
{text: 'Guides', link: '/guides'},
{text: 'Examples', link: 'https://github.com/lando/cli/tree/main/examples'},
];
};
17 changes: 10 additions & 7 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ title: lando config
description: lando config displays the lando configuration.
---

# config
# lando config

Displays the lando configuration.

You can also use `--field` to only display a single config value. *Almost all* of these options can be overridden via the Lando global `config.yml`. See the [config system](https://docs.lando.dev/core/v3/global.html) for more info.

## Usage

```bash
```sh
# Show me a config worthy of lando
lando config

Expand All @@ -24,9 +24,12 @@ lando config --format json

## Options

```bash
--format Output in given format: json
--help Shows lando or delegated command help if applicable
--verbose, -v Runs with extra verbosity
--path, -p Only return the value at the given path
```sh
--channel Sets the update channel [array] [choices: "edge", "none", "stable"]
--clear Clears the lando tasks cache [boolean]
--debug Shows debug output [boolean]
--help Shows lando or delegated command help if applicable [boolean]
--verbose, -v Runs with extra verbosity [count]
--format Output in given format: default, json, table [string] [choices: "default", "json", "table"]
--path Only return the value at the given path [string] [default: null]
```
60 changes: 0 additions & 60 deletions docs/defaults.md

This file was deleted.

15 changes: 9 additions & 6 deletions docs/destroy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: lando destroy
description: lando destroy completely destroys your application eg all data will be lost after running this command.
---

# destroy
# lando destroy

Destroys your app.

Expand All @@ -15,7 +15,7 @@ This command should not be confused with uninstalling Lando. It **will only** de

## Usage

```bash
```sh
# Interactive destruction
lando destroy

Expand All @@ -31,8 +31,11 @@ lando destroy --help

## Options

```bash
--help Shows lando or delegated command help if applicable
--verbose, -v Runs with extra verbosity
--yes, -y Auto answer yes to prompts
```sh
--channel Sets the update channel [array] [choices: "edge", "none", "stable"]
--clear Clears the lando tasks cache [boolean]
--debug Shows debug output [boolean]
--help Shows lando or delegated command help if applicable [boolean]
--verbose, -v Runs with extra verbosity [count]
--yes, -y Auto answer yes to prompts [boolean] [default: false]
```
10 changes: 5 additions & 5 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Any change you make to the `cli` project cloned (and correctly symlinked) to ope

If you want to help with contributing documentation here are some useful commands once you've cloned and installed the project.

```bash
```sh
# launch local docs site
npm run docs:dev

Expand All @@ -48,7 +48,7 @@ It's best to familiarize yourself with how Lando [does testing](https://docs.lan

Generally, unit testable code should be placed in `utils` and then the associated test in `tests` in the form `FILE-BEING-TESTED.spec.js`. Here is an example:

```bash
```sh
./
|-- utils
|-- stuff.js
Expand All @@ -58,7 +58,7 @@ Generally, unit testable code should be placed in `utils` and then the associate

And then you can run the tests with the below.

```bash
```sh
# Run unit tests
npm run test:unit
```
Expand Down Expand Up @@ -93,7 +93,7 @@ If you check out the various READMEs in our [examples](https://github.com/lando/

Before running all or some of the tests you will need to generate them.

```bash
```sh
# Run ALL the tests, this will likely take a long time
npm run test:leia

Expand Down Expand Up @@ -129,7 +129,7 @@ To deploy and publish a new version of the package to the `npm` registry you nee

Also note that if you create a "pre-release" it will tag the `npm` package with `edge` instead of the default `latest` tag. Also note that while you can toggle the pre-release checkbox after the initial release creation this will not trigger a new release and/or promote the release from `edge` to `latest`. If you want to deploy to `latest` then create a new release without pre-released checked.

```bash
```sh
# Will pull the most recent GitHub release
npm install @lando/cli
# Will pull the most recent GitHub pre-release
Expand Down
25 changes: 25 additions & 0 deletions docs/guides.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
description: Home helpful generic tutorial and guide content for Lando CLI
layout: page
title: Guides
sidebar: false
---
<VPLCollectionPage>
<VPLCollectionPageTitle>
<template #title>
Guides
</template>
<template #lead>
Some Lando CLI tutorials and guides
</template>
</VPLCollectionPageTitle>
<VPLCollectionPageTags v-model="tags" />
<VPLCollectionItems :tags="tags" :items="pages"/>
</VPLCollectionPage>

<script setup>
import {VPLCollectionPage, VPLCollectionPageTags, VPLCollectionPageTitle, VPLCollectionItems} from '@lando/vitepress-theme-default-plus';
import {useCollection} from '@lando/vitepress-theme-default-plus';

const {pages, tags} = useCollection('guide');
</script>
Loading
Loading