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

v19 #2816

Merged
merged 4 commits into from
Aug 22, 2024
Merged

v19 #2816

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
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ The content sources for the auto generation of `docs/balena-cli.md` are:
* [Selected
sections](https://github.com/balena-io/balena-cli/blob/v12.23.0/automation/capitanodoc/capitanodoc.ts#L199-L204)
of the README file.
* The CLI's command documentation in source code (`lib/commands/` folder), for example:
* `lib/commands/push.ts`
* `lib/commands/env/add.ts`
* The CLI's command documentation in source code (`src/commands/` folder), for example:
* `src/commands/push.ts`
* `src/commands/env/add.ts`

The README file is manually edited, but subsections are automatically extracted for inclusion in
`docs/balena-cli.md` by the `getCapitanoDoc()` function in
Expand Down Expand Up @@ -224,7 +224,7 @@ command, or by manually editing or copying files to the `node_modules` folder.

Unexpected behavior may then be observed because of the CLI's use of the
[fast-boot2](https://www.npmjs.com/package/fast-boot2) package that caches module resolution.
`fast-boot2` is configured in `lib/fast-boot.ts` to automatically invalidate the cache if
`fast-boot2` is configured in `src/fast-boot.ts` to automatically invalidate the cache if
changes are made to the `package.json` or `npm-shrinkwrap.json` files, but the cache won't
be automatically invalidated if `npm link` is used or if manual modifications are made to the
`node_modules` folder. In this situation:
Expand Down
2 changes: 1 addition & 1 deletion INSTALL-ADVANCED.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ By default, the CLI is installed to the following folders:
OS | Folders
--- | ---
Windows: | `C:\Program Files\balena-cli\`
macOS: | `/usr/local/lib/balena-cli/` <br> `/usr/local/bin/balena`
macOS: | `/usr/local/src/balena-cli/` <br> `/usr/local/bin/balena`

## Standalone Zip Package

Expand Down
2 changes: 1 addition & 1 deletion INSTALL-MAC.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To update the balena CLI, repeat the steps above for the new version.
To uninstall it, run the following command on a terminal prompt:

```text
sudo /usr/local/lib/balena-cli/bin/uninstall
sudo /usr/local/src/balena-cli/bin/uninstall
```

## Additional Dependencies
Expand Down
2 changes: 1 addition & 1 deletion automation/build-bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

import type { JsonVersions } from '../lib/commands/version/index';
import type { JsonVersions } from '../src/commands/version/index';

import { run as oclifRun } from '@oclif/core';
import * as archiver from 'archiver';
Expand Down
2 changes: 1 addition & 1 deletion automation/capitanodoc/capitanodoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { GlobSync } from 'glob';
*
* IMPORTANT
*
* All commands need to be stored under a folder in lib/commands to maintain uniformity
* All commands need to be stored under a folder in src/commands to maintain uniformity
* Generating docs will error out if directive not followed
* To add a custom heading for command docs, add the heading next to the folder name
* in the `commandHeadings` dictionary.
Expand Down
2 changes: 1 addition & 1 deletion automation/capitanodoc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import * as path from 'path';
import { getCapitanoDoc } from './capitanodoc';
import type { Category, Document, OclifCommand } from './doc-types';
import * as markdown from './markdown';
import { stripIndent } from '../../lib/utils/lazy';
import { stripIndent } from '../../src/utils/lazy';

/**
* Generates the markdown document (as a string) for the CLI documentation
Expand Down
4 changes: 2 additions & 2 deletions automation/capitanodoc/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { Parser } from '@oclif/core';
import * as ent from 'ent';
import * as _ from 'lodash';

import { getManualSortCompareFunction } from '../../lib/utils/helpers';
import { capitanoizeOclifUsage } from '../../lib/utils/oclif-utils';
import { getManualSortCompareFunction } from '../../src/utils/helpers';
import { capitanoizeOclifUsage } from '../../src/utils/oclif-utils';
import type { Category, Document, OclifCommand } from './doc-types';

function renderOclifCommand(command: OclifCommand): string[] {
Expand Down
4 changes: 2 additions & 2 deletions automation/check-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ async function checkBuildTimestamps() {
...gitStatus.staged,
...gitStatus.renamed.map((o) => o.to),
])
// select only staged files that start with lib/ or typings/
.filter((f) => f.match(/^(lib|typings)[/\\]/))
// select only staged files that start with src/ or typings/
.filter((f) => f.match(/^(src|typings)[/\\]/))
.map((f) => path.join(ROOT, f));

const fStats = await Promise.all(stagedFiles.map((f) => fs.stat(f)));
Expand Down
10 changes: 5 additions & 5 deletions bin/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const path = require('path');
const rootDir = path.join(__dirname, '..');

// Allow balena-dev to work with oclif by temporarily
// pointing oclif config options to lib/ instead of build/
// pointing oclif config options to src/ instead of build/
modifyOclifPaths();
// Undo changes on exit
process.on('exit', function () {
Expand Down Expand Up @@ -57,9 +57,9 @@ require('ts-node').register({
project: path.join(rootDir, 'tsconfig.json'),
transpileOnly: true,
});
require('../lib/app').run(undefined, { dir: __dirname, development: true });
require('../src/app').run(undefined, { dir: __dirname, development: true });

// Modify package.json oclif paths from build/ -> lib/, or vice versa
// Modify package.json oclif paths from build/ -> src/, or vice versa
function modifyOclifPaths(revert) {
const fs = require('fs');
const packageJsonPath = path.join(rootDir, 'package.json');
Expand All @@ -73,9 +73,9 @@ function modifyOclifPaths(revert) {

let oclifSectionText = JSON.stringify(packageObj.oclif);
if (!revert) {
oclifSectionText = oclifSectionText.replace(/\/build\//g, '/lib/');
oclifSectionText = oclifSectionText.replace(/\/build\//g, '/src/');
} else {
oclifSectionText = oclifSectionText.replace(/\/lib\//g, '/build/');
oclifSectionText = oclifSectionText.replace(/\/src\//g, '/build/');
}

packageObj.oclif = JSON.parse(oclifSectionText);
Expand Down
28 changes: 2 additions & 26 deletions docs/balena-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2168,13 +2168,9 @@ fleet name or slug (preferred)

open fleet dashboard page

#### --fields FIELDS

only show provided fields (comma-separated)

#### -j, --json

output in json format
produce JSON output instead of tabular output

## fleet pin &#60;slug&#62; [releaseToPinTo]

Expand Down Expand Up @@ -2353,29 +2349,9 @@ Examples:

### Options

#### --fields FIELDS

only show provided fields (comma-separated)

#### -j, --json

output in json format

#### --filter FILTER

filter results by substring matching of a given field, eg: --filter field=foo

#### --no-header

hide table header from output

#### --no-truncate

do not truncate output to fit screen

#### --sort SORT

field to sort by (prepend '-' for descending order)
produce JSON output instead of tabular output

# Local

Expand Down
19 changes: 0 additions & 19 deletions lib/framework/index.ts

This file was deleted.

158 changes: 0 additions & 158 deletions lib/framework/output.ts

This file was deleted.

Loading
Loading