@atlaskit/ads-cli 0.4.1 → 0.5.0
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/CHANGELOG.md +16 -0
- package/README.md +3 -5
- package/bin/ads-cli.js +6 -2
- package/dist/cjs/atlas-cli.js +4 -1
- package/dist/cjs/cli.js +91 -35
- package/dist/cjs/commands/build-manifest.js +1 -2
- package/dist/cjs/commands/cli-metadata.js +2 -1
- package/dist/cjs/commands/definitions.js +16 -16
- package/dist/cjs/output/format-disambiguation.js +3 -1
- package/dist/cjs/output/format-grouped-results.js +6 -2
- package/dist/cjs/output/format-manifest.js +5 -3
- package/dist/cjs/output/format-results.js +25 -18
- package/dist/es2019/atlas-cli.js +4 -1
- package/dist/es2019/cli.js +69 -17
- package/dist/es2019/commands/build-manifest.js +1 -2
- package/dist/es2019/commands/cli-metadata.js +1 -0
- package/dist/es2019/commands/definitions.js +8 -6
- package/dist/es2019/output/format-disambiguation.js +3 -2
- package/dist/es2019/output/format-grouped-results.js +5 -2
- package/dist/es2019/output/format-manifest.js +6 -3
- package/dist/es2019/output/format-results.js +25 -18
- package/dist/esm/atlas-cli.js +4 -1
- package/dist/esm/cli.js +92 -36
- package/dist/esm/commands/build-manifest.js +1 -2
- package/dist/esm/commands/cli-metadata.js +1 -0
- package/dist/esm/commands/definitions.js +16 -16
- package/dist/esm/output/format-disambiguation.js +3 -1
- package/dist/esm/output/format-grouped-results.js +6 -2
- package/dist/esm/output/format-manifest.js +5 -3
- package/dist/esm/output/format-results.js +26 -18
- package/dist/types/cli.d.ts +10 -1
- package/dist/types/commands/build-manifest.d.ts +1 -2
- package/dist/types/commands/cli-metadata.d.ts +1 -0
- package/dist/types/commands/types.d.ts +12 -1
- package/dist/types/output/format-disambiguation.d.ts +1 -1
- package/dist/types/output/format-grouped-results.d.ts +2 -1
- package/dist/types/output/format-manifest.d.ts +2 -1
- package/dist/types/output/format-results.d.ts +4 -3
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -8,4 +8,4 @@ import type { DisambiguationResult } from './disambiguation';
|
|
|
8
8
|
* Mirrors the compact search rows (name, optional hint, and a `→ <follow-up>` command) so the
|
|
9
9
|
* output is consistent with `search`, and tells the user how to disambiguate.
|
|
10
10
|
*/
|
|
11
|
-
export declare const formatDisambiguation: ({ query, noun, candidates }: DisambiguationResult) => string;
|
|
11
|
+
export declare const formatDisambiguation: ({ query, noun, candidates }: DisambiguationResult, invocation?: string) => string;
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* Render grouped results as sectioned compact output.
|
|
9
9
|
*/
|
|
10
|
-
export declare const formatGroupedResults: ({ groups, totalCount, }: {
|
|
10
|
+
export declare const formatGroupedResults: ({ groups, totalCount, invocation, }: {
|
|
11
11
|
groups: Record<string, unknown[]>;
|
|
12
12
|
totalCount: number;
|
|
13
|
+
invocation?: string;
|
|
13
14
|
}) => string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Format a scannable human catalog of the ADS CLI capability manifest.
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import type { RenderContext } from '../commands/types';
|
|
5
|
+
export declare const formatManifest: (data: unknown, { invocation }: RenderContext) => string | null;
|
|
@@ -13,11 +13,12 @@ import type { RowKind } from '../commands/types';
|
|
|
13
13
|
* Render an array of results as compact lines for the given kind. Returns `null` when the data
|
|
14
14
|
* is not an array (so the caller can fall back to generic JSON rendering).
|
|
15
15
|
*
|
|
16
|
-
* `showFollowUp` (default `false`) adds a `→
|
|
17
|
-
* row. Search enables it for both grouped and `--type` output; `--all` listings leave it off.
|
|
16
|
+
* `showFollowUp` (default `false`) adds a `→ <invocation> <command> <name>` drill-in hint beneath
|
|
17
|
+
* each row. Search enables it for both grouped and `--type` output; `--all` listings leave it off.
|
|
18
18
|
*/
|
|
19
|
-
export declare const formatCompactResults: ({ kind, data, showFollowUp, }: {
|
|
19
|
+
export declare const formatCompactResults: ({ kind, data, showFollowUp, invocation, }: {
|
|
20
20
|
kind: RowKind;
|
|
21
21
|
data: unknown;
|
|
22
22
|
showFollowUp?: boolean;
|
|
23
|
+
invocation?: string;
|
|
23
24
|
}) => string | null;
|
package/index.js
CHANGED
|
@@ -22,7 +22,7 @@ let entrypoint = path.join(__dirname, 'dist', 'cjs', 'cli');
|
|
|
22
22
|
if (isDev) {
|
|
23
23
|
// `@atlassian/ts-loader` registers `tsx` require hooks so the TypeScript source
|
|
24
24
|
// (including `.tsx` files and cross-package imports) can be `require`d directly
|
|
25
|
-
// without a pre-build step.
|
|
25
|
+
// without a pre-build step.
|
|
26
26
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
27
27
|
require('@atlassian/ts-loader');
|
|
28
28
|
entrypoint = path.join(__dirname, 'src', 'cli');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/ads-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "An npx-runnable command-line tool to query Atlassian Design System (ADS) structured content — components, tokens, icons, and guidelines — from the terminal.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|